Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[PHP] Header error

Joined
May 11, 2008
Messages
513
Reaction score
99
PHP:
<? if($site['maint'] =="1")
header( 'Location: http://alpha-studios.info/maintenace/' ) ;
?>

Code:
Warning: Cannot modify header information - headers already sent by (output started at /home/sedwards/public_html/alpha-studios/index.php:4) in /home/sedwards/public_html/alpha-studios/index.php on line 5
 
duck you, I'm a dragon
Loyal Member
Joined
Apr 29, 2005
Messages
6,407
Reaction score
130
Re: Help Needed. PHP

You're using a header, headers can only be used if there is absolutely no output what so ever before the header. This includes html, sessions, doctype etc.
 
Newbie Spellweaver
Joined
Sep 28, 2007
Messages
64
Reaction score
0
Re: Help Needed. PHP

PHP:
<? if($site['maint'] =="1")
header( 'Location: http://alpha-studios.info/maintenace/' ) ;
?>
Code:
Warning: Cannot modify header information - headers already sent by (output started at /home/sedwards/public_html/alpha-studios/index.php:4) in /home/sedwards/public_html/alpha-studios/index.php on line 5

Post the script upto the header() line and we can help alot easier
 
Junior Spellweaver
Joined
Dec 2, 2006
Messages
198
Reaction score
0
umm why not just:
PHP:
<? if($site['maint'] =="1")
echo "<meta http-equiv='refresh' content='0;url=http://alpha-studios.info/maintenace/'/>";
?>
your trying to redirect right?
 
Back
Top