解析错误:语法错误,意外的'('在第10行D:\xampp3\xampp\htdocs\contact.php中 [英] Parse error: syntax error, unexpected '(' in D:\xampp3\xampp\htdocs\contact.php on line 10

查看:180
本文介绍了解析错误:语法错误,意外的'('在第10行D:\xampp3\xampp\htdocs\contact.php中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have a problem with my code here. I'm making a simple "Contact us" via html / PHP. But i'm new to all this, and learning it from step to step. So thats why i've come here. I get this error: Parse error: syntax error, unexpected '(' in D:\xampp3\xampp\htdocs\contact.php on line 10 and here is the code:

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


推荐答案

试试这个:

Try this:

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

这篇关于解析错误:语法错误,意外的'('在第10行D:\xampp3\xampp\htdocs\contact.php中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆