Tag : php

I would like to ask, in the product list page similar to e-commerce, how do you usually prevent the picture from deforming? However, when I looked at Tmall Jingdong, I found that the original size proportions of the pictures are all the same. Is it the uniform size proportions of the pictures uploaded backstage? If ..

Read more

The environment is lnmp. The problem is that nginx did Reverse proxy and pointed to a nodejs project. Every time post submits a form 502, refreshing it is normal. What the hell Find the reason, when pm2 starts, watch the entire directory, the result file changes will restart, and then 502. . . I found ..

Read more

location /admin/ { root /aaa/dist; index index.html ; bracket For example, nginx inside has the above configuration, assuming the domain name is a.com.Then I visita.com/admin/index.htmlNginx will go to this directory to load this static html:/aaa/dist/admin/index.htmlNow, if I want to use/admin/After the url to find static files, how should it be configured? That’s what I hope ..

Read more

function person(name,age){ this.name = name; this.age = age; bracket person.prototype.say = function(){ Console.log(this.name plus “:”plus this.age); bracket function superman(name,age){ person.call(this,name,age); bracket superman.prototype = new person(); var s = new superman(‘superman’,29); I read in the book that this way of inheritance is perfect, but I don’t think so, because of hissuperman.prototype = new person();This sentence will ..

Read more

As a front end, I started writing backstage recently and encountered some problems in restful design. I hope you can answer them.The restful specification places special emphasis onHTTP Status CodesHowever, I have some doubts when I use it. Especially inReturns an error messageThis one.When I used it myself, I agreed on a set of business ..

Read more

The first way is to store custom events directly in __onfireEvents var __onfireEvents = {}; function _bind(eventName, callback, is_one, context) { if (typeof eventName ! == string_str || typeof callback ! == function_str) { Throw new Error(‘args:’ plus string_str plus’,’ plus function_str plus’); bracket if (! hasOwnKey(__onfireEvents, eventName)) { __onfireEvents[eventName] = {}; bracket __onfireEvents[eventName][ plus ..

Read more