How can I intercept HTTP requests in PHP? For example, if the request file name is my. do, it will be transferred to my own processing function. Content returned to the browser, which can be written by myself in this function. If it cannot be done in php, it can be done in apache. In APACHE, I assume that it redirects to a function in my own library file. ------ Solution ------------------ $ _ SERVER [PHP_SE how can I intercept HTTP requests in PHP?
For example, if the request file name is my. do, it will be transferred to my own processing function. Content returned to the browser, which can be written by myself in this function.
If it cannot be done in php, it can be done in apache. In APACHE, I assume that it redirects to a function in my own library file.
------ Solution --------------------
$ _ SERVER ['php _ SELF '] can be used to obtain the file name of the script being executed.
You can control the output content on your own.
------ Solution --------------------
Start from. What you said is too vague,
For example, AJAX
And
JSP can use the xmlrpc package of APACHE to send HTTP signals + XML to PHP. PHP processes the XML returned through HTTP
------ Solution --------------------
Url rewrite
------ Solution --------------------
Php does not have this type. php OO is not very strong. You need to configure the server or use the. htaccess file to forward all requests to index. php. Then, perform the next step based on predefined variables such as REQUEST_URI.
------ Solution --------------------
Discussion
Start from. What you said is too vague,
For example, AJAX
And
JSP can use the xmlrpc package of APACHE to send HTTP signals + XML to PHP. PHP processes the XML returned through HTTP
------ Solution --------------------
Check the $ _ SERVER Manual
------ Solution --------------------
Speaking of url rewrite, refer to the 7 th Floor,
Send to my. Do requests are forwarded to your own PHP file to read data, and then processed in different places based on the data.
------ Solution --------------------
Discussion
Speaking of url rewrite, refer to the 7 th Floor,
Send to my. Do requests are forwarded to your own PHP file to read data, and then processed in different places based on the data.
------ Solution --------------------
Discussion
Files like my. do not exist.