The thinkphp website recently found a problem, that is, after ajaxpostget was sent to the php background method, it was impossible to debug the thinkphp website recently, after ajax post/get is sent to the php background method, it cannot be debugged --!
Then I searched the internet and found that ajax --> php really has no good way to debug ...(This is my question. how can I Debug php after ajax is submitted? For example, I want to check the value of a variable in php.)
For help
Reply content:
I recently found a problem during thinkphp website, that is, after ajax post/get is sent to the php background method, I cannot debug it --!
Then I searched the internet and found that ajax --> php really has no good way to debug ...(This is my question. how can I Debug php after ajax is submitted? For example, I want to check the value of a variable in php.)
For help
Google Developer Tool. in the network, XHR can see the ajax request address, which contains submitted data and background response information.
Xdebuger
Google F12 is enough. you don't have to worry about using the debugging tool that comes with the framework.
Chrome-> F12 check-> NetWork-> XHR
F12 review elements
You can write the variable to the file, and then run ajax to view the file. tp can directly use log records.
With an extension of xdebug and IDE, you can implement php breakpoint or something.
Next, the next breakpoint. you can Debug php after you break it down !!
Firefox's firebug is not quite good.
File_put_contents ('/log.txt', var_export ($ _ POST, true ));
// The execution of the program will not end at all, and the obtained token will be output to the log.txt file of the current directory.