我正在运行这个php文件并且它昨天出现在浏览器上,但今天,突然间,我无法正确查看文件,也无法通过源代码找到代码浏览器。
此外,这是我关注的教程: https://www.youtube.com/watch?v=hAkKC8DKN9A
以下是代码:
<?php
error_reporting(E_ALL ^ E_NOTICE);
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Member System - Log In</title>
</head>
<body>
<?php
$form = "<form action='./login.php' method='post'>
<table>
<tr>
<td>Username:</td>
<td><input type='text' name='user' /></td>
</tr>
<tr>
<td>Password:</td>
<td><input type='password' name='password' /></td>
</tr>
<tr>
<td></td>
<td><input type='submit' name='loginbtn' value='Login' /></td>
</tr>
</table>
</form>";
if ($_POST['loginbtn']) {
$user = $_POST['user'];
$password = $_POST['password'];
if ($user) {
if ($password) {
require("connect.php");
password = md5 (md5("kjfiufj".$password."Fjf56fj"));
echo "$password";
$query = mysql_query("");
mysql_close();
}
else
echo "You must enter your password. $form";
}
else
echo "You must enter your username. $form";
}
else
echo $form;
?>
</body>
</html>
答案 0 :(得分:2)
PHP解析错误:语法错误,意外&#39; =&#39;在第41行。替换
password = md5 (md5("kjfiufj".$password."Fjf56fj"));
到
$password = md5 (md5("kjfiufj".$password."Fjf56fj"));