-
Prompt class not found for references between class files under the tp5 framework on the server
for example, the following figure shows the error message and the corresponding file under applicationmobilesupportcontroller
the namespace of both class files is namespace appmobilesupportController; Message file with the following use: use app...
-
Model events such as TP5.0 before_insert are invalid?
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...
-
Php sets the corresponding key of the cache
I use thinkphp5
I don t know how a key corresponds to a value when using cache
my preliminary idea is to apply controller name concatenation method name splicing all passing parameters md5 encrypted string as key
when you get the cache, you also...
-
How to develop composer packages for the framework?
thinkphp5 composer
tp5 composer
...
-
Can the route of thinkphp5 be modified to make tp5 run on nginx? in forced mode without modifying the nginx configuration?
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 ...
-
How is thinkphp5 designed to use transactions?
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...
-
The Controller method of timing running thinkphp5 under linux Server
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 >
...
-
Thinkphp route matching problem
Route::post( xdk plan , xdk plan save );
Route::post( xdk plan :id fav , xdk plan fav );
Route::post( xdk plan :id comments , xdk plan comments );
is to build a restful style api xdk plan post xdk plan :id fav like xdk plan :id c...
-
Php, website visit ip according to time record
Business requirements, to record the visit record of the web page, according to ip, but now add one, according to the time, if the ip address is 202.192.26.26, and visited at 15:00, he will not record the visit to this web page within an hour, but will s...
-
Php does long tail word search.
for example, the user fills in Hello World in the from form, but the search url needs to be changed into search nihaoshijie, but the search value is still searched according to the string of Hello World passed by the user. Since the searched url is to be...
-
TP5 does not support remote one-to-many preloading
Can the remote one-to-many association provided by TP5 be performed in the association preload? I ve tried. Why not?
article article table field articleid.. article_typetag tag table field tagid. article_tagvalue article tag table field articleid t...
-
Thinkphp5.0 cannot receive the data sent by the post request?
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...
-
Ajax, reported undefined error in thinkphp5, as shown in the figure
as shown in the picture, the undefinde error is reported, but I don t understand the error. Please take a look at it.
...
-
The problem of phpexcel import time
the framework is TP5
there is a short date when importing
!
this date format cannot be used. the online search method says to use PHPExcel_Shared_Date::ExcelToPHP () , but the incoming value reported with this error is not a numeric value. Is ...
-
How to count and output the number of users recommended by each user at the same time when outputting the list of users?
the tuijian field is your own recommendation code in the table. Otuijian is the recommendation code that you fill in when you register. when you output the user list, count and show the number of users recommendations at the same time. I use the foll...
-
PHP infinite classification.
figure 1: click on the food to show the secondary category, and all the stores related to the food :(3):
:
...
-
Questions about swoole sessions
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 automatically uploads pictures to the server
how to upload jpg format images of d disk under windows to the server in batch via thinkphp ...
-
Tp5.1 workerman runs according to manual. Php server.php doesn't respond.
problem description
tp5.1 workerman runs php server.php according to the manual and does not respond, as shown in the following figure
server.php:
php7.0.3publicserver.phppushworkerphp server.phpconsole:
the boss who has used tp5.1 workerman, ple...
-
How does TP5.1 query the previous and next records in the database?
as the title: according to the specified ID number, query the previous record and the next record in the database respectively, and then return the ID number of this record. Please tell a small demo thank you. ...