解析错误:语法错误,意外的'('在第10行D:\ xampp3 \ xampp \ htdocs \ contact.php中

我的代码在这里有问题。 我正在通过html / PHP做一个简单的“联系我们”。 但我对这一切都很陌生,并逐步学习。 这就是为什么我来到这里。 我得到这个错误:解析错误:语法错误,意想不到的'('在第10行D: xampp3 xampp htdocs contact.php中,这里是代码:

<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>

尝试这个:

<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>
链接地址: http://www.djcxy.com/p/11989.html

上一篇: Parse error: syntax error, unexpected '(' in D:\xampp3\xampp\htdocs\contact.php on line 10

下一篇: Why don't PHP attributes allow functions?