strange thing, ajax response includes whitespace

后端 未结 3 2078
孤街浪徒
孤街浪徒 2020-12-11 16:51

I ave several JS functions that call different php files with $.ajax jquery method... yesterday everything was fine, but after cleaning up my code, i don\'t know what i did,

3条回答
  •  余生分开走
    2020-12-11 17:15

    When I had the same problem it was just a carriage return or space after the closing PHP tag, a surprisingly easy thing to introduce by accident.

    Make sure you open the PHP tag at the start of the first line of your script, close it at the end and delete everything after the closed tag (should be easy to spot in a good editor).

    I can see no reason why not closing your PHP tag wouldn't just be really annoying.. but thats just me!

提交回复
热议问题