Jump to content

Output starst on the third line


kirill578

Recommended Posts

I have some page that generates JSON array but the problem that java script ajax can't recognize it as a JSON code because it begins in the third line of the output ( press CTRL+U to see it )

I found out that the problem is my function php page that is Included ( include() ) there. but this function page doesn't send any output?! what is the problem!?

 

http://maadif.co.cc/stuff/ajax_request.php

Link to comment
https://forums.phpfreaks.com/topic/228429-output-starst-on-the-third-line/
Share on other sites

what is the problem!?

 

You didn't post enough of your code that produces/reproduces the problem.

 

How could anyone here be able to tell you what is wrong with your php code without seeing the portion of it that produces the output?

Most likely it's spacing between 2 sets of PHP tags, or the output is given extra linebreak or whatever

Try using trim() on the output to remove extra whitespaces.

Also try to remove any spacing between PHP tags, this is usally the issue.

 

Regards, PaulRyan.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.