Apache Services in Wamp for Apache services in XAMPP related issues

Source: Internet
Author: User
Tags php error
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
  • Related Article

    Contact Us

    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.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.