Jump to content

Redirect not working.


Russia

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/169754-redirect-not-working/
Share on other sites

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.