我在下面的代码中收到了以下错误:(解析错误:语法错误,意外的文件结束,期待'`' in)。
<?php
include_once 'connect.php';
include_once 'functions.php';
sec_session_start(); // Our custom secure way of starting a PHP session.
if (isset($_POST['email'], $_POST['p'])) {
$email = $_POST['email'];
$password = $_POST['p']; // The hashed password.
if (login($email, $password, $mysqli) == true) {
// Login success
header('Location: ../protected_page.php');
` //echo 'Login Successful';
}
else {
// Login failed
header('Location: ../loginpage.php?error=1');
//echo "Login Unsuccessful";
}
}
else {
// The correct POST variables were not sent to this page.
echo "Invalid Request";
} ?>
答案 0 :(得分:0)
你错过了
的大括号if (login($email, $password, $mysqli) == true) {
如果条件,也缺少父级的大括号
if (isset($_POST['email'], $_POST['p'])) {
答案 1 :(得分:0)
也许&#39; connect.php&#39;或者&#39; functions.php&#39;文件将包括&#39;`&#39;字符。 请调查这些文件。