random1 Posted January 11, 2008 Share Posted January 11, 2008 Hey all PHP gurus, I'm using the following code to include PHP pages once: // Checks once required file function checkRequireOnce($page, $extension, $path) { $filename = $path.$page.".".$extension; if (file_exists($filename)) { require_once($filename); } else { header ("Location: errorpage.php?type=RequireOnce&file=$page.$extension"); } } This seems to run fine on all browsers (firefox, opera, netscape) but doesn't compile in Internet Explorer. It produces a blank white page. Any suggestions? Quote Link to comment https://forums.phpfreaks.com/topic/85485-php-site-not-running-in-internet-explorer/ Share on other sites More sharing options...
Nhoj Posted January 11, 2008 Share Posted January 11, 2008 I'm not 100% sure on this but I read somewhere that IE sometimes requires http://www.somedomain.com/PAGE in the header("Location:") tag... Try replacing: header ("Location: errorpage.php?type=RequireOnce&file=$page.$extension"); with header ("Location: http://".$_SERVER['HTTP_HOST']."/errorpage.php?type=RequireOnce&file=$page.$extension"); Quote Link to comment https://forums.phpfreaks.com/topic/85485-php-site-not-running-in-internet-explorer/#findComment-436270 Share on other sites More sharing options...
random1 Posted January 11, 2008 Author Share Posted January 11, 2008 I did more testing and actually found that it was another bit of coding stuffing it up: <!-- Code: Automatic Text Sizing Source: http://alistapart.com/articles/howtosizetextincss --> <style type="text/css"> body { font-size:100%; line-height:1.125em; } .bodytext p { font-size:0.875em; } </style> <!--[if !IE]>--> <style type="text/css"> body { font-size:16px; } </style> <!--<[endif]--> Quote Link to comment https://forums.phpfreaks.com/topic/85485-php-site-not-running-in-internet-explorer/#findComment-436272 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.