-
Can the field be Filter for the results of the query in the TP3.2 database? GetXxxAttribute () similar to laravel
stateful fields are often saved in the database, which are represented by numbers:
0-> fail reject 1-> success pass
and so on, I want to convert 0 or 1 into Chinese characters in the obtained results, is there any good way to quickly complete t...
-
Tp5 uses redis, to add extension guidance
how do you tp5 encapsulate the extension function of redis? Because there are only simple functions of set and get by default, guide me. ...
-
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...
-
Why did thinkphp (3.2.3) URL jump with more index.php??
< H2 > Apache server < H2 >
config file configuration is like this
URL_HTML_SUFFIX => html ,
URL_CASE_INSENSITIVE => true,
URL_MODEL => 2,
URL_ROUTER_ON =>true,
.htaccess file configuration is like this
<IfModule mo...
-
Json_encode problem under thinkphp5
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...
-
Please help me convert this native SQL statement into TP5 thank you!
ask God to help me translate this native SQL statement into TP5 thank you! It is Db:: ( name )-> this kind of chained operation select a.id, a.titlerect a. Createwriting time as answer_count from fa_question a. Isometric solvepaper count (b.qid) as ...
-
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...
-
Thinkphp time intercept into html how to write.
use the thinkphp3.2.3 framework, call the date style on the front page as shown below, how to write it in html? Can fall out, but the style can not show the effect of the following figure, do not want to add separate date parameters in the database. ...
-
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...
-
Problems with thinkphp5.17 federated query
this sql statement, under thinkphp5.17
tp
there is another problem. My sql statement is executed incorrectly. I can t see the error statement in the tract panel or runtime log. I want to see what I did wrong and what I think.
...
-
Sometimes tp5.1 can't find a class of the framework.
has been developing with tp5.1 recently. Because of the requirements, there is no front-end separation, using the template engine. But a strange phenomenon occurs when I load a page occasionally that some classes of the system do not exist. Such as thi...
-
Php recommends developing an interface framework for APP
1. Do you need a framework? the framework loads too many files by default, which hinders performance .
two The framework comes with interface verification (to prevent arbitrary calls), version management (APP version upgrade is fast), etc., if there is ...
-
Consult about the problem of belongsTo association in thinkphp5
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...
-
How does the thinkphp5 template volist parse variables?
Please take a look. Is it wrong to write this? why can t you parse this variable ?
...
-
There are some problems in uploading multiple images in Layui.
the corresponding return path cannot be obtained when multiple images are uploaded. I don t know why?
...
-
How to break the problem of garbled code in the title of WampServer interface?
as shown in the picture, the red box area is supposed to be Powered by Alter Way, but my display is also the same with garbled reinstallation
...
-
Does thinkphp3.2 have a callback event after searching the database?
the desired effect is that all methods that manipulate the database in the project perform some custom actions after successful execution. frameworks such as laravel have corresponding solutions, such as throwing events. ...
-
How to develop composer packages for the framework?
thinkphp5 composer
tp5 composer
...
-
TP the same code on different servers one can execute correctly and the other reports a 302error
A piece of code I wrote can be executed normally under the test server and locally, but I reported a 302 error under the development server. I don t quite understand, the content is exactly the same, so I want to ask. Is there any reason for this? I am...
-
Ask for advice on the verification code of PHP SMS
now that CAPTCHA is sent to the specified mobile phone number, the question now is how to verify the CAPTCHA and whether to store the result in the database. I use Ali big fish. I don t know if I can get the content sent.
after the user enters the CA...