Wamp Apache Services in the XAMPP service problem in Apache?
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 13if ($_session["UNC"]== "") {
Line 14?>
It should be stated that the UNC variable is not defined in advance elsewhere.
Thank you, big guy!!!
Share to:
------Solution--------------------
PHP script plus: error_reporting (E_all & ~e_notice);
or change the error level in php.ini.
------Solution--------------------
Change the PHP error level
E_all Show all errors and warnings
~e_notice does not show NOTICE notifications
------Solution--------------------
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