我创建一个注册和登录页面,但是它一直在工作,直到我在顶部添加了一个php include行,现在页面只是加载显示实际的原始代码而不是登录页面,任何人都可以告诉我在哪里我我出错了吗?
<?php include('functions.php') ?>
<!DOCTYPE html>
<html>
<head>
<title>Registration system PHP and MySQL</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="header">
<h2>Register</h2>
</div>
<form method="post" action="register.php">
<?php echo display_error(); ?>
<div class="input-group">
<label>Username</label>
<input type="text" name="username" value="<?php echo $username; ?>">
</div>
<div class="input-group">
<label>Email</label>
<input type="email" name="email" value="<?php echo $email; ?>">
</div>
<div class="input-group">
<label>Password</label>
<input type="password" name="password_1">
</div>
<div class="input-group">
<label>Confirm password</label>
<input type="password" name="password_2">
</div>
<div class="input-group">
<button type="submit" class="btn" name="register_btn">Register</button>
</div>
<p>
Already a member? <a href="login.php">Sign in</a>
</p>
</form>
</body>
</html>
答案 0 :(得分:0)
您没有从服务器运行代码,将项目放在此目录中 如果您正在使用:
Xampp: C:\xampp\htdocs
或
Wamp: C:\wamp\www