Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/263.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
解析错误语法错误意外的文件结尾,使用PHP_Php - Fatal编程技术网

解析错误语法错误意外的文件结尾,使用PHP

解析错误语法错误意外的文件结尾,使用PHP,php,Php,这是什么意思 我的页面一直运行良好,但我将XAMPP更新到了更新的版本1.8.1。之后,我只收到以下错误消息: 分析错误:语法错误,第106行C:\xampp\index.php中的文件意外结束 您似乎有不同的PHP配置 在php.ini文件中启用 或者转换所有确保所有PHP代码都在 @lanzz如果您看到第一个php打开标记。。。你会看到它的有效性(长)谢谢你的朋友。工作正常。您可能需要更改 <?php if (isset($_POST['submit'])) {

这是什么意思

我的页面一直运行良好,但我将XAMPP更新到了更新的版本1.8.1。之后,我只收到以下错误消息:

分析错误:语法错误,第106行C:\xampp\index.php中的文件意外结束


您似乎有不同的PHP配置

在php.ini文件中启用


或者转换所有
确保所有PHP代码都在


@lanzz如果您看到第一个php打开标记。。。你会看到它的有效性(长)谢谢你的朋友。工作正常。您可能需要更改

<?php
    if (isset($_POST['submit']))
    {
        include('Mysql.php');

        // Include database connection settings
        $username=$_POST['username'];
        $password=$_POST['password'];
        $username = stripslashes($username);
        $password = stripslashes($password);
        $username = mysql_real_escape_string($username);
        $password = mysql_real_escape_string($password);

        // Retrieve username and password from database according to user's input

        $subm = mysql_query("SELECT * FROM usercreation WHERE (UserId = '" .$username. "') and (Password = '" .$password. "')");

        // Check username and password match
        if (mysql_num_rows($subm) == 1)
        {
            session_start();

            // Set username session variable
            $_SESSION['username']=$username;
            //$ss=$_SESSION['username'];

            // Check, if user is already login, then jump to secured page
            if (isset($_SESSION['username']))
            {
                header('Location:master.php');
            }
        }
        else
        {
?>

<script type="text/javascript">
    alert("The username or password you entered is incorrect.");
    document.location='index.php';
</script>

<?
        }
    }
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link rel="stylesheet" type="text/css" href="css/style.css" />
        <title>Mani</title>
    </head>

    <body>
        <center>
            <div style="width:980px;" class="mod-container">
                <div style="width:980px; height:50px;">
                </div>

                <div style="width:980px; height:130px; float:none;">
                   <div style="width:250px; height:130px; float:left; background-image:url(img/logo_mani.png);">
                   </div>
                </div>

                <div style="width:980px; height:350px; float:none;">
                    <div style="width:270px; height:350px; margin-left:10px; float:left;">
                    </div>

                    <div style="width:400px; height:350px; background-image:url(img/loginbg.png); margin-left:10px;float:left;">
                        <!--   Form start here-->
                        <form method="POST" action="<?php $_PHP_SELF ?>">
                            <div style="width:369px; height:275px; margin-left:17px; margin-top:59px; float:left;">
                                <div style="width:321px; height:48px; background-image:url(img/uid.png); margin-left:27px; margin-top:30px; float:left;" class="log">
                                    <input type="text" placeholder="Username" onBlur="this.value=!this.value?'Username':this.value;" onFocus="this.select()" onClick="this.value='';" name="username" value="Username">
                                </div>
                                <div style="width:321px; height:48px; background-image:url(img/pw.png); margin-left:27px; margin-top:29px; float:left;" class="log">
                                    <input type="password" placeholder="Password" onBlur="this.value=!this.value?'Password':this.value;" onFocus="this.select()" onClick="this.value='';" name="password" value="Password">
                                </div>
                                <div style="width:321px; height:29px;  margin-left:27px; margin-top:15px; float:left;" class="logforgot">
                                    <!--   <a href="#" style="">Forgot Password ?</a>-->
                                </div>
                                <div style="width:321px; height:48px;  margin-left:27px; margin-top:19px; float:left;">
                                    <input class="logbutton" type="submit" value="Login" name="submit">
                                </div>
                            </div>
                        <!--   Form end here-->
                        </form>
                    </div>

                    <div style="width:270px; height:350px; margin-left:10px;float:left;">
                    </div>
                </div>
            </div>

            <div id="footer-wrap">
                <div style="width: 980px; height:20px; float:none;">
                    <div style="width: 580px; height:20px; float:left;"class="footercontainer"><p>© 2012 Amara Raja Batteries Limited.</p></div>
                    <div style="width: 210px; height:20px; float:right;"class="footercontainer"><p>All Rights Reserved | Privacy Policy</p></div>
                </div>
            </div>
        </center>
    </body>
</html>
// Line 37
<?php
    }
}
?>