Please take a look. Is it wrong to write this? why can"t you parse this variable
Please take a look. Is it wrong to write this? why can"t you parse this variable
template, yes. Change the controller to $this- > view- > assign ('list',$list);
change $this- > assign (' list',$rtrade) to $this- > assign ('rtrade',$rtrade). The first parameter in it is the name of the variable, followed by the value of the variable
.Previous: React projects report errors in non-chrome browsers
Next: Why use document.querySelector () to select elements on jsbin and the result is null
I set up User.php, User.php under the model layer and have a method getUserInfo to query the data, as follows: $userModel = new UserModel; dump($userModel->getUser()); dump(json_encode($userModel->getUser())); the first printed data is as follo...
follow the ThinkPHP5.0 official manual prompt: User::event( before_insert , function ($user) { if ($user->status != 1) { return false; } }); :https: www.kancloud.cn manua... TP beforeInsert ,,,,. the direct insertion is s...
situation description: A Table: user s coupon Information Table, Field: id,ticket_id,status B Table: voucher Information Table, Field: id,ticket_info,status in Model A, there is the following code: class An extend Model { public function getUserTi...
browser error: SQLSTATE [HY000] [1045] Access denied for user root @ localhost (using password: NO) I successfully connected to the database with navicat, the user name is root, password is the password set when installing mysql, and the framework...
check whether to log in in the check class file under the behavior file under the module, and then jump to the business, use the redirect prompt to report an error, and find the answer Call to undefined method app admin behavior CheckBehavior::redir...
all controllers of my background module admin, need operation authentication, or build operation menus, or other common operations on the premise of ignoring the intermediate key: my previous way of writing is to write a "master " controller common...
how to realize the if judgment of mysql. There is now a table with two key fields SELECT * FROM house WHERE price= 8500 OR shoufu= 30 I think, when the $price passed in by php is empty, the sql search statement is SELECT * FROM house WHERE s...
Why does thinkphp5 always report errors when uploading multiple files using the multiple attribute? error message: HTML Code: <input name="file" type="file" multiple > <input type="submit" value=""...
$this- > request- > isPost () uses $.post (target, query) .success (function (data) { in receiving empty data to report the following error Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version....
A simple post request, which was normal before, suddenly went wrong. As thinkphp5.0 is not very familiar with it, it should not be a big problem. I hope you will pass by and have a look. WeChat Mini Programs client sends post request code, which does...
think-queue; is used in TP5, but when enabled, the Redis extension is not installed! but my extension does have I don t know why? Solve it! there s nothing wrong with the environment variable! ...
for business reasons, you need to bind different modules to different domain names in the tp5 framework. now, for example, www.test.com has entered the index controller index method in the hkfc module. but the second * .test.com does not work, for ...
var token = localStorage.getItem( userToken ); if(!token){ alert( ); return false; } var ws = new WebSocket("ws: 127.0.0.1:8081"); when ws.onopen, I intend to send token to the server for verification, but it...
TP5 model queries with the field () method have a field that does not display Commodity table model ** * * * @return think model relation HasMany * public function goodsComment() { return $this->hasMany( Ma...
foreground code $.ajax({ type: POST , url: __URL__ add , data:{content:data} }); data is an array $data $_REQUEST ajax ...
recently used the queue, used the official queue package top-think think-queue , successfully wrote the data into the queue after installation, but went to the consumption queue, that is, when using php think queue:work-- queue xxx, prompted that the c...
learn to use Tp5.1 when looking at other people s code, I think a lot of operations about the database are written into the controller; public function save() { $data = input( post ); $validate = $this->validate($data,"app commo...
for example, the array is like this $data = [ [ mobile => 1 , price => 100.00 ], [ mobile => 2 , price => 500.00 ], ]; one-dimensional array can be verified di...
I installed carbon, with composer and got an error when using it: fatal error: Class CarbonCarbon not found I installed it using composer require nesbot carbon. The directory structure after installation is as follows: Do you want to set some...
problem description as shown in the figure below, when thinkphp5 logs out, he always jumps to the interface that waits for 3 seconds. Is there any way to jump to the login interface without going through the waiting interface? the environmental bac...