function redirect($url) { if (!headers_sent()) { header('Location: '.$url); exit; } else { echo ''; echo ''; exit; } } $edition = 'lahore'; $checkfile = "../assets/".$edition."/date.txt"; if(file_exists($checkfile)) { $myfile ="../assets/".$edition."/date.txt"; $fh = fopen($myfile,'r'); $dt = fread($fh,filesize($myfile)); fclose($fh); $dd = 'page.php?id=1&edition=lahore&dt='.$dt; redirect($url = $dd); } ?>
Please Wait website is loading |