PHP帮助,如果没有

Well I have this check install index page that displays a login form if a certain file exists, and the login form doesn't display, just the install page.. I have no idea why because if you click install it won't let you because the files exist?

<?php
ini_set('zlib.output_compression', 4096);
ob_implicit_flush(true);

//Load & Auth Setup
$int = '/core/config/int.php';
if (file_exists($int)) {
echo'
<html> 
    <head>
        <meta name="description" content="">
        <meta name="keywords" content="">
        <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css">
        <title>Welcome</title>
    </head>
    <style>
    #wrapper {
    width: 500px;
    margin: 0 auto;
    margin-top:200px;
    }
    </style>
<body>
<div id="wrapper">
<form class="form-horizontal" role="form">
  <div class="form-group">
    <label for="inputEmail3" class="col-sm-2 control-label">Email</label>
    <div class="col-sm-10">
      <input type="email" class="form-control" id="inputEmail3" placeholder="Email">
    </div>
  </div>
  <div class="form-group">
    <label for="inputPassword3" class="col-sm-2 control-label">Password</label>
    <div class="col-sm-10">
      <input type="password" class="form-control" id="inputPassword3" placeholder="Password">
    </div>
  </div>
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
      <div class="checkbox">
        <label>
          <input type="checkbox"> Remember me
        </label>
      </div>
    </div>
  </div>
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
      <button type="submit" class="btn btn-default">Sign in</button>
    </div>
  </div>
</form>
</body>
</html>';
 } else { 
 echo'
 <head>
        <meta name="description" content="">
        <meta name="keywords" content="">
        <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css">
        <title>Install</title>
    </head>
    <style>
    #wrapper {
    width: 500px;
    margin: 0 auto;
    margin-top:200px;
    }
    </style>
<body>
<div id="wrapper">
<h2>
<small>
Not complete
</small>
</h2>
<p>
<p>
<p>Get setup in minutes! Enjoy the super easy installation wizard to walk you through the setup process.</p>
<p>Start your installation by clicking the button below!</p>
</p>
<p>
<a href="install/">
Install
</a>
</p>';
  }
  ?>

check if you have some weird permission issue on the web server, when you check file_exists on the file.

it's better to use absolute path rather then relative for this and enable error_reporting and display_errors that way you can get to the root of the problem far quicker.

Watch out!

file_exists function works in the OS scope, not http scope. So if you pass /int it will actually search for a folder named int in the root of your OS machine, not your webserver.

Use this:

$int = __DIR__ . '/core/config/int.php';

__DIR__ outputs the current directory, and I suppose that concatenating with /core/config/int.php it will locate it. Use it if you have PHP 5.3. or more.