Jump to content

Common errors


shakeit

Recommended Posts

Hello, I am getting this error at several places:

 

headers already sent (output started at ......)

 

I think it is a common error, so sorry for asking such a "stupid" question...

 

Does a common rule exist for avvioding these errors?

 

Thank you all...

 

 

Link to comment
Share on other sites

Output is anything visible in the browser (ex: anything you can see when you view source in the browser).

 

This can be html, echo() calls, print() calls, ect.

 

Your best bet is to check out the output buffer functions.. and use a buffer to catch anything that would be outputted, and flush it to the browser at the end of the script

 

http://ca.php.net/manual/en/ref.outcontrol.php

Link to comment
Share on other sites

Why don't you post some of your code so we can see what your doing and whats going on?

 

Yeah I would but there are so many places I get this error, hehe... anywayz I tried this solution by putting header an session_start() before anything else, and it works.. But what if I want to use header() in the middle of a html page :-S Thats the issue, but i get the idea... thanx...

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.