Questions tagged [thinkphp]

ThinkPHP is a Chinese PHP framework created by 上海顶想信息科技有限公司. It's a free open-source, fast, simple object-oriented lightweight PHP development framework that was born for agile Web and small enterprise application development. Compared to Laravel, ThinkPHP had employed a light-weight and much simpler design principles. It has 2 major releases, version 3 and 5, all licensed under Apache 2 Open Source.

ThinkPHP is a PHP framework that describes itself as:

Fast,Compatible & Simple OOP MVC PHP Framework,support UTF-8、PlugIns,and Multi- databases support.

22 questions
0
votes
0 answers

Assigning the property $action of a class ($this) to an variable $conf, why it is an array?

There is the following function in the controller.php of framework thinkphp used in a project, where there is this line of codes: "$conf = $this->$action". "if (property_exists($this, $action))" is checking if there exists property $action in the…
sunyaer
  • 81
  • 1
  • 10
0
votes
1 answer

mac-thinkphp controller is not exist

My Index.php has two functions. index of function is good, but test of function is bad. I have no idea. [0] HttpException in App.php line 578 控制器不存在:app\index\controller\Test try { $instance = Loader::controller( …
stone
  • 1
  • 1
0
votes
2 answers

How to get name from id in array using query?

I had array values as cause Ex: $cause = $_REQUEST['cause']; ie., $cause = 2,3,4 How to get that array value cause name from query My table name is 'cp_cause' How to get the 2,3,4 cause name from the above table. My sample query model in thinkphp…
JoygiveKalai
  • 63
  • 12
0
votes
2 answers

How to store multiple rows on database in Thinkphp

I want to store multiple rows in single submit button. This is cart page Here i added just simple code. i want to store multiple rows in database HTML
JoygiveKalai
  • 63
  • 12
0
votes
1 answer

how to parse this json data in php (replace " with ")

I get a json data from Android App which looks like {"NickName":"Tom"} how to get NickName data with php?
xiehongguang
  • 1,274
  • 1
  • 10
  • 24
0
votes
1 answer

How should a Model be turned to a Instance in ThinkPHP framework?

This question concerns merely ThinkPHP programmers. So there are Model and D() in ThinkPHP. A model is very useful to communicate with the DB. But when we use D() to create a Model then find a piece of data. actually what we get is a array. Then how…
bijiDango
  • 1,385
  • 3
  • 14
  • 28
0
votes
1 answer

How to limit _id field to return in MongoDB use Thinkphp/PHP?

I use Thinkphp to develope a web project.Now i need query the mongodb with specified fields and suppress the '_id' field.But the '_id' field is include in result set by default.I know in mongodb client can use follow code to suppress '_id' field,but…
Jack Sun
  • 277
  • 1
  • 3
  • 14
1
2