用两个代码解析错误

时间:2018-07-30 22:14:08

标签: php

<?php

include 'core/init.php';

if (empty($_POST) === false) 
{
    $username= $_POST ['username'];
    $password= $_POST ['password'];

    if (empty($username) === true || (empty($password) === true)
{
   echo "Write your User name and Password"  ;

}else if (user_exists($username) === false) {

 echo =   "Username does not exists. Have you registered?";
}

}
?>

解析错误:语法错误,第12行的C:\ xampp \ htdocs \ login.php中出现意外的'echo'(T_ECHO)

甚至

<?php

include 'core/init.php';

if (empty($_POST) === false) 
{
    $username= $_POST ['username'];
    $password= $_POST ['password'];

    if (empty($username) === true || (empty($password) === true)
{
  $errors =  "Write your User name and Password"  ;

}else if (user_exists($username) === false) {

 $errors=   "Username does not exists. Have you registered?";
}

}
?>

解析错误:语法错误,意外的';'在第12行的C:\ xampp \ htdocs \ login.php中

0 个答案:

没有答案