If the php file is written separately, it will be messy. how can we classify the php file? How can I deal with the response of different requests more efficiently when multiple ajax files correspond to one php file? If the php file is written separately, it will be messy. how can we classify the php file?
How can I deal with the response of different requests more efficiently when multiple ajax files correspond to one php file?
Reply content:
If the php file is written separately, it will be messy. how can we classify the php file?
How can I deal with the response of different requests more efficiently when multiple ajax files correspond to one php file?
Users should be classified based on the service category rather than Requests. for example, requests for users have User information and User information modified. these requests are closely related to users, you can put the processing logic in a php file.
It is true that an ajax request is a PHP request, and there is no logic error even if it is written like this; it is just used to using another php proxy for all requests, such as gateway; in this way, the front-end only needs one Address Prefix. the specific operations are attached to this prefix, which makes it easier to manage programs during later maintenance and development. In addition, this method is suitable for server topology management, such as reverse proxy or server load balancer;