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. ...
createdTime: {type: Date, required: true, default: Date.now}, +30 endTime: {type: Date, required: true, default: Date.now + } how to implement Date.now + for half an hour ...
const app = getApp () Page ({ data: {) questions:{}, }, onLoad: function (options) { this.requestTopic(this); }, onReady: function () {}, onShow: function () { console.log(this.data); console.log(this.data.questions); }, requestTopic: (that) = > ...
vuejson main.vue main.json...
ui, written in react is placed under the server. How to access it? do you still need to package the project? I just want to test and dock with the background interface, how to do it ...
recently in the process of developing mobile APP with MUI: when I recharge and jump to a few pages, I return to the home page and click on the bottom tab to find stutter. Neither the official document nor the forum has found a solution. 2. ...