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. ...
this is the configuration information. Is there a problem? what is the relationship between postfix and mail service? can t you send mail without postfix? ...
< H2 > prompt not found < H2 > < H2 > this is the content of package.json < H2 > { "name": "simple-project-cli", "version": "1.0.3", "description": "a simple projetc cli with express, ...
I ve been looking at this code for 2 hours, maybe because I wrote it myself, but I just can t see anything wrong $.get( data.json ).done(funtion (data) { <--missing ) after argument list Charts.hideLoading(); Charts.setOption({ ...
< hr > finally found that time.Sleep (100 * time.Millisecond) will affect the database. After removing it, I didn t encounter the problem of busy buffer . < hr > I have encountered some problems in converting a piece of data from Table 1 to Table ...
I recently considered whether to introduce git flow workflow to the project team, using the git flow tool built into the sourcetree tool (which can reduce the cost of learning), but when using it, I found some problems in the flow process and workflow. ...