Jump to content

PHP site not running in Internet Explorer?


random1

Recommended Posts

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?

 

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");

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]-->

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.