Russia Posted August 11, 2009 Share Posted August 11, 2009 I currently have this script: <php $File = "inc/config.php"; $fh = fopen($File, 'r'); $Data = fread($fh, filesize($File)); fclose($fh); echo "Data: $Data"; if($Data == '0'){ header("Location: install/install.php"); } else { header("Location: index.php"); } ?> It is supposed to redirect to install.php if config.php does not have any characters. If config.php has characters inside of it, it will load the current page called index.php But its not working when i put it on top of my site. Quote Link to comment https://forums.phpfreaks.com/topic/169754-redirect-not-working/ Share on other sites More sharing options...
JonnoTheDev Posted August 11, 2009 Share Posted August 11, 2009 Read the sticky at the top of this forum on using headers. You cannot use a header post printing output to the screen. Quote Link to comment https://forums.phpfreaks.com/topic/169754-redirect-not-working/#findComment-895574 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.