Ajax receives PHP back to get a bunch of HTML code one, error code:
<Fontsize= ' 1 '><Tableclass= ' Xdebug-errorXe-notice ' dir= ' ltr 'Border= ' 1 'cellspacing= ' 0 'cellpadding= ' 1 '> <TR><thAlign= ' Left 'bgcolor= ' #f57900 'colspan= "5"><spanstyle= ' Background-color:#cc0000; color: #fce94f; font-size:x-large; '>( ! )</span>notice:undefined variable: _session in D:\wamp64\www\lost_and_Found\bootstrap\phpfiles\custom_sendMail.php on line<I>11</I></th></TR> <TR><thAlign= ' Left 'bgcolor= ' #e9b96e 'colspan= ' 5 '>Call Stack</th></TR> <TR><thAlign= ' Center 'bgcolor= ' #eeeeec '>#</th><thAlign= ' Left 'bgcolor= ' #eeeeec '>Time</th><thAlign= ' Left 'bgcolor= ' #eeeeec '>Memory</th><thAlign= ' Left 'bgcolor= ' #eeeeec '>Function</th><thAlign= ' Left 'bgcolor= ' #eeeeec '>Location</th></TR> <TR><TDbgcolor= ' #eeeeec 'Align= ' Center '>1</TD><TDbgcolor= ' #eeeeec 'Align= ' Center '>0.0004</TD><TDbgcolor= ' #eeeeec 'Align= ' Right '>366336</TD><TDbgcolor= ' #eeeeec '>{main} ( )</TD><TDtitle= ' D:\wamp64\www\lost_and_Found\bootstrap\phpfiles\custom_sendMail.php 'bgcolor= ' #eeeeec '>... \custom_sendmail.php<b>:</b>0</TD></TR> </Table></Font> <Preclass= ' Xdebug-var-dump 'dir= ' ltr '> <Small>D:\wamp64\www\lost_and_found\bootstrap\phpfiles\custom_sendmail.php:12:</Small><FontColor= ' #3465a4 '>Null</Font> </Pre>
Second, why appear?
Believe that someone will see a bunch of code after the scalp tingling. The novice is not sure how to produce.
In fact, since this is a bunch of HTML code, then copy it to the file, in the browser open do not know it?
How do you copy that? Because many people appear this error is in using AJAX to submit data to php,php return garbled data, often is the alert output, in the prompt box cannot be copied.
Third, the solution
First turn on Chrome debugging,
When an AJAX request is initiated, a log appears in the console. Point it ~ (TAP)
Then the changes that appear, the AJAX submission address corresponding to the PHP will also be displayed, click on the PHP you want to submit.
Click on the response to copy it. You can view the returned data here.
In addition, headers can view information such as submitted data.
After copying to the HTML file, paste opens.
Oh, my Cao. This is not the PHP error prompt. The original is the submission address PHP logic error. Let's change it. And, you see, the place where the error occurred and the approximate type of error is indicated. Follow the instructions to modify it OK. Mine is not open seesion_start cause.
Ajax receives PHP back to get a bunch of HTML code