Home >Backend Development >PHP Tutorial >photoshop skills analysis of some php skills and precautions
From the browser, using header(location) will jump to another page, but in fact, PHP will still execute the background code. If the code behind has unsafe logic, then just ignore the developer. The set conditions continue to be executed.
For example:
Copy code The code is as follows:
if(true)
{
header('location:http://www.jb51.net');
}
file_put_contents('test.txt ', 'ok');
Copy the code The code is as follows:
var_dump( $query );//Print the result as text to view
$GLOBALS //Save all global variables (only in the current page)
get_defined_vars() //Returns an array composed of all defined variables (including global variables, superglobal variables, etc.)
get_defined_constants() //Returns an array composed of all defined constants
The above has introduced photoshop skills and some analysis of PHP skills and precautions, including photoshop skills. I hope it will be helpful to friends who are interested in PHP tutorials.