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. ...
as shown in the figure, the span-method method is called every time I display a dialog box, and then this result is caused I use a triggered flag to determine that this can be avoided, knowing that method in vue will be called again due to change...
now I decompiled Wechat Mini Game and found that its code js seems to be packaged into a file code.js (20,000 lines) should be the layabox used by the subcontracting mechanism now I want to get the code of the development environment? ...
vue + UEditor developers do not refresh anything for the first time before loading it UEditor components <template> <script :id=id type="text plain">< script> < template> <script> import * as _ from .. ...
the json object passed from the previous page is (I don t know why there are a lot of " ", unsolved) "{ " img ": [ " _ doc uniapp_temp compressed 1543388247982.jpg "], " time ": " 2018-11-28 ", " title ": "} " question: if you want the for l...
router.beforeEach ((to, from, next) = > { if (to.matched.some (record = > record.meta.requiresAuth)) { if (!localStorage.token) { next({ path: login , query: { redirect: to.fullPath } }) } else { next() } } else { ...