PHP include problem

Discussion in 'Programming/Scripts' started by meirarmon, Jul 9, 2010.

  1. meirarmon

    meirarmon New Member

    I purchased a template and I was beginning to write php code to make the admin. I am having a problem that the site is showing up in chrome and firefox properly, but in internet explorer, the whole code is messed up.

    At the top of the page I have an include with php code, that if I take it out the site displays properly. Why should this include effect anything? the php does not give any html output...

    in google chrome I viewed the source and i see a character like a dash before the html tag, though it is not a character that I can copy and paste.

    Can someone help me please? This is urgent, I have a deadline for the project.

    More Information: URL of the site is:

    the problem I am having is in internet explorer 8. If you make a comparison, the page shows fine in all browsers other than ie (tested in chrome and firefox).

    The code for login.php is:

    include 'inc/settings.php';

    if (isset(
    $username $_SESSION["username"];
    elseif (isset(
    $username $_COOKIE["username"];
    if (isset(
    $password $_SESSION["password"];
    elseif (isset(
    $password $_COOKIE["password"];
    if (isset(
    $remember $_COOKIE["remember"];
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    <html xmlns="">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title><?php echo $login_title;?></title>
    <link href="css/960.css" rel="stylesheet" type="text/css" media="all" />
    <link href="css/reset.css" rel="stylesheet" type="text/css" media="all" />
    <link href="css/text.css" rel="stylesheet" type="text/css" media="all" />
    <link href="css/login<?php echo $dir;?>.css" rel="stylesheet" type="text/css" media="all" />

    <body dir="<?php echo $dir;?>">
    <div class="container_16">
      <div class="grid_6 prefix_5 suffix_5">
             <h1><?php echo $login_title;?></h1>
            <div id="login">
              <!--<p class="tip">You just need to hit the button and you're in!</p>-->
    if (isset($_SESSION["errors"]))
                    foreach (
    $_SESSION["errors"] as $err)
    '<p class="error">'.$err.'!</p>';
              <form id="form1" name="form1" method="post" action="doLogin.php">
                  <label><strong><?php echo $login_username;?></strong>
    <input type="text" name="username" class="inputText" id="textfield" value="<?php if (isset($username)) echo $username;?>"/>
                  <label><strong><?php echo $login_password;?></strong>
      <input type="password" name="password" class="inputText" id="textfield2" value="<?php if (isset($password)) echo $password;?>"/>
                <a class="black_button" href="#" onClick="document.form1.submit();"><span><?php echo $login_login;?></span></a>
                 <input type="checkbox" name="remember" id="checkbox" <?php if (isset($remember)) echo $remember;?>/>
                  <?php echo $login_remember;?></label>            
              <br clear="all" />
              <a href="<?php echo $_SERVER['PHP_SELF'];?>?lang=english"><img src = "images\flag_icons\png\us.png" style="height:15px;" alt="english" border="0"></a>
              <a href="<?php echo $_SERVER['PHP_SELF'];?>?lang=hebrew"><img src = "images\flag_icons\png\il.png" style="height:15px;" alt="hebrew" border="0"></a>
            <div id="forgot">
            <a href="#" class="forgotlink"><span><?php echo $login_forgot;?></span></a></div>
    <br clear="all" />
  2. falko

    falko Super Moderator ISPConfig Developer

    Did you clear IE's browser cache?
  3. meirarmon

    meirarmon New Member

    yes, it still does not work
  4. falko

    falko Super Moderator ISPConfig Developer

    Does inc/settings.php generate any output?
  5. meirarmon

    meirarmon New Member

    no, there is not output.
  6. meirarmon

    meirarmon New Member

    I managed to solve it.

    What I did was, I converted all the encoding of the include files to utf8 without BOM and it worked. Can anyone tell me why this was the solution?

    Thanks for everything

Share This Page