the server can only receive the first pre-request (options) cannot receive the second get or post request this is the CORS processing code No problem on PC ...
how to time the controller method written by thinkphp5 under the linux server , you can write the bat file under windows, but how to implement it under linux, and, if you run regularly, does it affect the performance of the server < hr > ...
Array A: $a = [ 0 => [ num => 100], 1 => [ num => 105], 3 => [ num => 253], N....... ] Array B: $b = [ 0 => [ id => 1, num => 300 ], 1 => [ id =>...
use thinkphp5.1x for interface development and do a global exception handling layer. class ExceptionHandler extends Handle { private $code; private $msg; private $errCode; public function render( Exception $e) { if($e insta...
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=""...
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...
I want some template variables to be available globally, such as some system setup information and website title classes, and different modules may need to call the same variables. how can such variables be used globally? now I ve done a simple test ...
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...
1. There is no problem with testing the code locally 2. When you turn on php think queue:listen on the server, there is no response or error message, as if nothing has been moved. 3. However, you can insert a new task queue, but do not execute to the s...
is it better to put the transaction in the controller, or in the model, or is there another solution when using TP5 when you need a transaction? If you put it in a model, and multiple models are involved in the process, and the process requires a transac...
because you want to create an additional administrative entry, it is convenient to change the name of the entry file. app admin contrller Login Login: <?php namespace app admin controller; use think Controller; class Login extends Control...
function findChild(&$arr,$id){ $childs=array(); foreach ($arr as $k => $v){ if($v[ pid ]== $id){ $childs[]=$v; } } return $childs; } function build_tree($rows,$root...
it is said that Session can be shared between master and slave domain names, (two projects, two TP5 frameworks) domain.com a.domain.com b.domain.com but in the TP5 primary domain name, the Session in the secondary domain name is set to the same d...
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...
you could have checked User, through Conuntry and then Post, through User. Now you can check Post; directly through Country usually the relationships between Country and User,User and Post are established beforehand, and then you can use hasManyThrough...
The server does not support modifying the configuration file (site-building host). The current environment is nginx1.10.2. question: currently, by setting the route and forcing the mode, it is found that it does not work. What is the problem? Whether ...
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...
thinkphp5 composer tp5 composer ...
the corresponding return path cannot be obtained when multiple images are uploaded. I don t know why? ...
Please take a look. Is it wrong to write this? why can t you parse this variable ? ...
wants to show the result of the addition of the two variables on the screen, but the current way of writing only shows the value of the initial variable . related codes <div class="grid margin-top-20"> ...
...
A website that used to crawl suddenly added protective measures. It used to be normal, but now when you only use urlopen in urllib and only try to get the home page HTML, this error occurs when Request joins headers: Requestheaders but all browsers...
such as the title: I need to request an interface on my page: $.get(url, data, function (res) { if (res.Code == 100) { ... } else { ... } }) -1 later, some people said that it was a cross-domain problem. With the men...
...