The same project, placed in the Wamp Apache server, can be used normally, no error, but when placed in the XAMPP Apache server, will prompt the error, the error code is as follows:
notice:undefined Index:unc in D:\xampp\htdocs\cazlcompany0820\zhuce_jm.php on line 13
Also, the file code for zhuce_jm.php on line 13 is as follows:
Line 12 Line if ($_session["UNC"]== "") {
Line?>
It should be stated that the UNC variable is not defined in advance elsewhere.
Thank you, big guy!!!
Reply to discussion (solution)
PHP script plus: error_reporting (E_all & ~e_notice);
or change the error level in php.ini.
PHP script plus: error_reporting (E_all & ~e_notice);
or change the error level in php.ini.
Can you give an explanation of the meaning of this code?
Change the PHP error level
E_all Show all errors and warnings
~e_notice does not show NOTICE notifications
PHP script plus: error_reporting (E_all & ~e_notice);
or change the error level in php.ini.
Thank you very much, after the test found that really solve the problem, but can explain the reasons for it. Thank you!
Notice:undefined Index:unc ....
$_session["UNC"] not found
Your two environments are not configured the same
#1 is to get you to block out Notice level errors.
That's avoiding the problem.
But you should take a look at 13 lines before you see if the Session_Start function was executed.
and will
if ($_session["UNC"]== "") {
Switch
if (Isset ($_session["UNC") && $_session["UNC"]== "") {
is the robust code
if (Isset ($_session["UNC")) {
With Isset
Try it with Visual AMP, unzip to run,
Currently feel the best use of PHP integrated operating environment.