Firefox error 'no element found'

前端 未结 2 845
萌比男神i
萌比男神i 2020-12-06 04:40

First off, this isn\'t exactly the ideal way of setting up a page, however there\'s a need to distribute a script as 1 file.

I have a php script at the top of an ot

相关标签:
2条回答
  • 2020-12-06 05:31

    You should have your php return a valid HTTP response, because Firefox will try to read it even if you don't do anything with it. So return at least a valid header

    header("HTTP/1.0 200");
    exit();
    
    0 讨论(0)
  • 2020-12-06 05:32

    Firefox is expecting to get something it can parse as XML back, and throwing an XML parsing error when it gets an empty response.

    Before your PHP calls "exit()", use

    header('Content-Type: text/plain');
    

    and Firefox will not try to parse the response as XML, and there should be no error.

    0 讨论(0)
提交回复
热议问题