Ajax receives PHP back to get a bunch of HTML code

Source: Internet
Author: User
Tags php error

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

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.