我的代码存在问题。 我正在通过html / PHP制作一个简单的“联系我们”。 但我是这一切的新手,并逐步学习它。那就是为什么我来这里。 我收到此错误:解析错误:语法错误,意外'('在D:\ xampp3 \ xampp \ htdocs \ contact.php第10行,这里是代码:
<i><?php
include 'core/init.php';
include 'includes/overall/header.php';
if (empty($_POST) === false) {
$name = $_POST ['name'];
$email = $_POST ['email'];
$message = $_POST ['message'];
if (empty($name) === true || (empty( ($email) === true || (empty($message === true) {
$errors[] = 'Name, email and message are required!';
} else {
}
?></i>
答案 0 :(得分:0)
试试这个:
<i><?php
include 'core/init.php';
include 'includes/overall/header.php';
if (empty($_POST) === false) {
$name = $_POST ['name'];
$email = $_POST ['email'];
$message = $_POST ['message'];
if (empty($name) === true || empty($email) === true || empty($message) === true) {
$errors[] = 'Name, email and message are required!';
} else {
}
// The else above is actually not needed thus you could remove it.
}
?></i>