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?

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.