doubi3929 2014-02-04 19:44
浏览 39

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>';
  }
  ?>
  • 写回答

2条回答 默认 最新

  • duanke1286 2014-02-04 19:58
    关注

    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.

    评论

报告相同问题?

悬赏问题

  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么