1

我正在尝试在 php5.6 上运行 php 应用程序,并使用 IIS10、Windows Server 2019 和 FastCGI 安装最新的服务器。但应用程序 UI 看起来失真(在混合了 html 和 php 代码的 php 文件上)。那是因为最新版本的 iis 和服务器还是一些 PHP 设置问题?下面是我得到的控制台中出现错误的示例代码。

这是 DOCTYPE html 从内部输入占位符开始的问题

在此处输入图像描述

示例代码 -

<?php 
    session_start();
    if(isset($_SESSION["myusername"]) && $_SESSION["mypassword"]){
        echo "<script>var token = localStorage.getItem('reccoon_usersid'); window.location.href='checklogin.php?user_session=' + token;</script>";
        // header("location:checklogin.php?");
    }

?>
<!DOCTYPE html>
<html lang="en">
<head>
  <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>Reccoon::ViDoc</title>
    <link rel="stylesheet" href="bootstrapjs/bootstrap.min.css">
    <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script src="bootstrapjs/jquery.min.js"></script>
    <script src="bootstrapjs/bootstrap.min.js"></script>    
    <style type="text/css">
        <!-- Some css style here -->
    </style>      
</head>
<body>
    <div class="container">
        <div class="row vertical-offset-100">
            <div class="col-md-4 col-md-offset-4">
                <div class="panel panel-default">
                    <div class="panel-heading">                                
                        <div class="row-fluid user-row">
                            <img src="images/reccoonlogo.png" class="img-responsive" alt="Conxole Admin"/>
                        </div>
                    </div>
                    <div class="panel-body">
                        <form accept-charset="UTF-8" role="form" class="form-signin" method="post" action="checklogin.php">
                            <fieldset>
                                <label class="panel-login">
                                    <input id="user_session_id" type="hidden" name="user_session" value="">
                                    <div class="login_result"></div>
                                </label>
                                <input class="form-control" placeholder="Username" type="text" id="myusername" name="myusername">
                                <input class="form-control" placeholder="Password" type="password" id="mypassword" name="mypassword">

                                <input class="btn btn-lg btn-success btn-block" type="submit" id="submit" name="submit" value="Login">
                            </fieldset>
                                <?php
                                    if(isset($_SESSION['login_display_msg'])){           
                                        echo "<p id='display_login_validation'>".$_SESSION['login_display_msg']."</p>";
                                    }
                                    unset($_SESSION['login_display_msg']);
                                ?>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
<footer>
    <script type="text/javascript">
         if(localStorage.getItem('reccoon_usersid') !== undefined){
            $('#user_session_id').val(localStorage.getItem('reccoon_usersid'));
         }
    </script>  
</footer>
</html>

如果有人可以帮助解决这个疯狂的错误,将不胜感激

4

0 回答 0