From the browser, using the header (location) to jump to another page, but in fact, PHP will still execute the background code, if the following code has unsafe logic, then directly ignore the developer set the conditions, continue to put the following things to execute.
Such as:
Copy CodeThe code is as follows:
if (true)
{
Header (' location:http://www.jb51.net ');
}
File_put_contents (' test.txt ', ' OK ');
In this code, the careless programmer will think of the header (' location:http://www.jb51.net '); Over, in fact, the code in the background is still executed, so when using the header (location), whether it is encapsulated in another function or directly written, it is recommended to add exit () to confirm that the program is aborted.
====soap
Running a demo code today, "Class ' soapclient ' not found" error occurred. Search, need to start the SOAP service, but in php.ini Windows extensions did not find Soap.dll, initially thought that my PHP version does not contain this DLL, to the PHP installation directory of the EXT subdirectory looked, found PHP_ The Soap.dll is present. That's easy, just add Extension=php_soap.dll to the Windows Extensions section and restart Apache.
SSL default is also not started, Extension=php_openssl.dll, you can put it in front of ";" Just get rid of it.
Copy CodeThe code is as follows:
Var_dump ($query);//print results as text to view
$GLOBALS//Save All global variables (only in the current page)
Get_defined_vars ()//Returns an array of all defined variables (including global variables, hyper-global variables, etc.)
Get_defined_constants ()//returns an array consisting of all defined constants
http://www.bkjia.com/PHPjc/322967.html www.bkjia.com true http://www.bkjia.com/PHPjc/322967.html techarticle from the browser, using the header (location) to jump to another page, but in fact, PHP will still execute the background code, if the following code has unsafe logic, that ...