problem description 1. The whole project uses the framework of thinkphp. A few days ago, I encountered the following error when I tried to compress html code with gulp-htmlmin: thinkphp 2.js : : <volist name="list" id="vo&quo...
The scenario looks something like this: A list page that lists, for example, more than 10 items for the first time, loads more items by "Click to load more " (10 items at a time). Then clicking on the product will take you to the "Product details Pa...
1. When I add categories in the controller, there is a field path, that needs to execute the method in the model to give the path value, and then the method save () thinkphp in the controller has after_insert and after_update. laravel doesn t know wha...
I want to take out the notification list of the current user (including the status of whether the user views it or not. The status is in another table. If user--id exists in notice_record, it means it has been read.) the structure of the table is as fol...
there is no problem with this access Route::get( register , index register register )->middleware( Login ); Route::get( login , index login login )->middleware( Login ); the manual also says that middleware forms that support rou...
use addAll to add multiple identical pieces of data in batches; that is to say, what is passed in from the front end is actually an one-dimensional array; how to do verification? For example: I want to verify fields such as typeId,price, num, count c...
504 Gateway Time-out 504 Gateway Time-out nginx ...
class A { const STR = "A"; public function x() { echo self::STR; } } class B extends A{ const STR = "B"; } (new B)->x(); the final output is A. how do you underst...
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...
for example, print the variable in the response event after a button is submitted. You can use dump, in tp5, but you don t know how to debug in thinkcmf. Thank you ...
is_dir (): open_basedir restriction in effect. File ( ) is not within the allowed path (s): ( home www.abc.com public: home www.abc.com : proc : tmp) shouldn t the key File ( ) point to runtime cache, how can it become , I print var_dump (RUNTIME_P...
How does the URL in XmlHttpRequest.open () write the code in the controller as follows: public function check () { $name = array( eq ,I( get.name )); $user = D( User ); $result = $user->field( name )->where($name)->find();...
the js code is as follows: function send() { var xml = new XMLHttpRequest(); xml.onreadystatechange = function () { if(xml.readyState==4 & xml.status==200){ if(xml.responseText== true ){ ...
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...
such as the following code. Filled with all kinds of if statements. I have no idea where to start the optimization.. I don t know if there is any way to solve this kind of multiple if judgment. Reduce code redundancy and improve efficiency. The functio...
recently, I was learning from WeChat Mini Programs. I hung up with the server provided in the book, and then I found a source code. visual observation is a framework of thinkphp. I don t know how to use it when I download it. The goal I want to achieve ...
if both pieces of data are wrong in automatic verification, how do I return two error messages? ...
what if b wants to use the $time variable in a? public function a(){ $time= 1520452015 ; return $this->fetch(); } public function b(){ } ...
for example, why can the max () method be called $this- > max ( id ) as well as statically self::max ( id ) ? ...
write the following in body, but not in JS. ...
Permission denied appears after npm run dev ...
the captured dom element is inserted into a html file of my project, and the style file css is also put into my project directory and introduced in the html file, but this css will affect my other styles, is there any solution? Except for using iframe. ...
Today, looking at the source code of a routing packet, I think this judgment is a bit superfluous. I hope you can help understand the source code of this block. Project address: https: github.com noahbusche. this package is very small, the followin...
H5 vue project how to adapt to some special bangs and bumps of Android, such as Huawei P20, etc., adapting to the iphoneX,iphone official website has proposed a solution, is there any Android? ...
recently, I have been learning about java nio, which has been a bit strange. There is such a common code in nio programming . for(xxxxxxx){ if(selectionKey.isAcceptable()){ ServerSocketChannel ssc = (ServerSocketChannel) selectionKey.channel()...