Php 提交表格的空白页

Php 提交表格的空白页,php,session,Php,Session,我在“GetUsers.php”页面上有这段代码 用户: 管理 在“actions/getusers.php”中,我有以下内容: <?php include('../../config.php'); session_start(); if( isset($_SESSION['password']) && $_SESSION['password']==$usdb_config['adminpassword'] ) { return true; } if( !

我在“GetUsers.php”页面上有这段代码


用户:
管理
在“actions/getusers.php”中,我有以下内容:

<?php

include('../../config.php');

session_start();

if( isset($_SESSION['password']) && $_SESSION['password']==$usdb_config['adminpassword'] ) {
    return true;
}
if( !isset($_SESSION['password']) ) {
    header("Location: ../login.php");
    die();
}
if( isset($_SESSION['password']) && $_SESSION['password']!==$usdb_config['adminpassword'] ) {
    header("Location: ../login.php");
    die();
}

require('../../other/casesensitivecfg.php');
$AdminPassword = $_SESSION['password'];

$locationtodb =  '../../database/'.$usdb_config['db_username'].$usdb_config['db_password'].$usdb_config['db_passphrase'].'/';
$users = file_get_contents($locationtodb.'users.txt');
$User = $_POST['user'];
$SearchUser = $User;
$pattern = preg_quote($SearchUser, '/');
$pattern = "/^.*$pattern.*\$/m";
preg_match_all($pattern, $users, $matches);
$wholeLine = implode("\n", $matches[0]);
$data = explode(":", $wholeLine);

// header('Content-Type: text/plain');

?>

以及“actions/getusers.php”中HTML代码之间的代码:


操作/getusers.php
脚本中,如果使用管理员密码,第一个
if
将终止脚本

<?php

include('../../config.php');

session_start();

if( isset($_SESSION['password']) && $_SESSION['password']==$usdb_config['adminpassword'] ) {
    return true;    // This kills the script before any output is generated
}

您是否检查了web服务器的错误日志?可能与@JayBlanchard重复-在“操作”目录中没有日志文件,并且我不是web服务器的所有者。。。这只是共享主机。即使使用共享主机,您也应该可以访问共享的错误日志。这是知道可能是什么错误导致的唯一方法。使用
adminpassword
    <?php

            if( isset($_POST['Form']) ) {
                echo '
                <ul class="list-group">
                    <li class="list-group-item"><strong>User Owner: </strong>'.$data[2].'</li>
                    <li class="list-group-item"><strong>User: </strong>'.$data[0].'</li>
                    <li class="list-group-item"><strong>User Status: </strong>'.$data[1].'</li>
                </ul>
                ';
            }

            if( !preg_match_all($pattern, $users, $matches) ) {
                echo '<div class="alert alert-danger" role="alert">The user you entered does not exists!</div>';
            }

            if( $_POST['user']=="this_line_must_not_be_edited_or_removed" ) {
                echo '<div class="alert alert-danger" role="alert">The user you entered does not exists!</div>';
            }

    ?>
<?php

include('../../config.php');

session_start();

if( isset($_SESSION['password']) && $_SESSION['password']==$usdb_config['adminpassword'] ) {
    return true;    // This kills the script before any output is generated
}