What is the problem about Apache service in wamp serving xampp? The same project can be used normally on the wamp Apache server. no error is reported. However, when it is placed on the xampp Apache server, an error is Prompted. the error code is as follows: Notice: & nbsp; Undefined & nbsp; how does the Apache service in wamp serve the Apache service in xampp?
The same project can be used normally on the wamp Apache server. no error is reported. However, when it is placed on the xampp Apache server, an error is Prompted. the error code is as follows:
Notice: Undefined index: unc in D: \ xampp \ htdocs \ cazlcompany0820 \ zhuce_jm.php on line 13
In addition, the file code of zhuce_jm.php on line 13 is as follows:
Line 12 Line 13if ($ _ SESSION ["unc"] = ""){
Line 14?>
Note that the unc variable is not defined elsewhere.
Thank you !!!
Share:
------ Solution --------------------
Add error_reporting (E_ALL & ~ to the php script &~ E_NOTICE );
Or change the error level in php. ini.
------ Solution --------------------
Change php error severity
E_ALL show all errors and warnings
~ E_NOTICE: do not display notice notifications
------ Solution --------------------
Notice: Undefined index: unc ....
$ _ SESSION ["unc"] not found
Your two environments have different configurations.
#1. blocking Notice-level errors
That is, to avoid the problem.
But you should check whether the session_start function has been executed before line 13.
And set
If ($ _ SESSION ["unc"] = ""){
Change
If (isset ($ _ SESSION ["unc"]) & $ _ SESSION ["unc"] = ""){
Robust code
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.