-
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...
-
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...
-
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 ?
...
-
The browser reported an error Access denied for user 'root'@'localhost' (using password:NO
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...
-
Tp5 syntax group by is used with count (*)
like Table Fields id typeid article id userid user id status like status 1: liked 0: not liked
I want to know that the id of an article is the total number of likes of 1br 2 code 3 group by typeid 4. I don t know how to use tp5 to write Native ...
-
TP5 detects login jump in behavior class, and redirect reports an error
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...
-
How does TP5.1 do mailbox verification?
for example, I want to verify that this email is legal. How do I want to verify it with TP s own verification rules? I think the manual defines a User class We define a app index validate User validator class for User validation. is it so tro...
-
How to understand the application public files in thinkphp5?
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...
-
Realize the if judgment of where of mysql
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...
-
The problem of obtaining values from multiple tables with SQL statements in thinkphp
Table 1 fields are as follows
2
3
1event_description_description_id2id1cel_order_item_order_item_id3id
123idnull
id
ask the boss for advice
...
-
Why does thinkphp5 always report an error when uploading multiple files using the multiple attribute?
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=""...
-
Thinkphp5.1 $this- > request- > isPost () question
$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....
-
Tp3 circulates using the array add operation add method, which results in an increasing amount of memory.
G( begin );
$model = M( test_data );
$list = M( test_ids )->getField( id ,true);
foreach ($list as $k => $v) {
$data = [];
$data[ params ] = $this->params;
$temp_arr = $this->post($this->ur...
-
TP5's questions about public templates
which page needs to use the common part to directly use the include to introduce the public part is over, but the manual talks about three layout methods, which is not very troublesome? why not directly use include? which method do you use in actual deve...
-
After the TP parent class introduces some class libraries, there is no need to introduce subclasses, right?
for example, if some class libraries are introduced into the parent class file Base.php, and then the child class file Son.php inherits the parent class file and uses these class libraries in the subclasses, you don t have to introduce these classes, r...
-
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...
-
Thinkphp Redis problem
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!
...
-
Multiple top-level domain names of tp5 are bound to different modules.
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 ...