[PHP] chat script

2005-04-17 Thread sukalyan banga
  Sir,
 I am hosted a chat script at www.bioraj.net/raj/chat/ but it shows some 
error what should I do.

 sukalyan

   


RE: [PHP] chat script

2005-04-17 Thread YaronKh
This error message is because you are trying to send header information after 
you already printed some text.
The header information have to come before any other information sent to the 
browser meaning :

?php
   Print (hello);
   header('Location: http://www.example.com/');
?
WON'T WORK!!!

But 
?php
   header('Location: http://www.example.com/');
print (hello);
?
Will work

And another ting the ?php should be in the first line of the php file even an 
empty line will generate the error!.

Line 1=
Line 2=?php
Line 3=   header('Location: http://www.example.com/');
.
.
.
WON'T WORK!!


And you can use headers_sent() to check if you can send the header information

if (!headers_sent()) {
header('Location: http://www.example.com/');
 exit;
}



Have a nice day
Yaron Khazai
-Original Message-
From: sukalyan banga [mailto:[EMAIL PROTECTED] 
Sent: Sunday, April 17, 2005 8:46 AM
To: php-general@lists.php.net
Subject: [PHP] chat script

 Sir,
 I am hosted a chat script at www.bioraj.net/raj/chat/ but it shows some 
error what should I do.

 sukalyan

   

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Chat Script

2005-04-16 Thread sukalyan banga
Hi!
   I am  finding  a chat script from which I can use that script as a private 
chatting work at my own URL.