2016-07-03 4 views
0

아래의 코드에서 오류가 발생합니다. (구문 분석 오류 : 구문 오류, 예기치 않은 파일 끝, '' '이 (가) 있음). 또한 부모에 대한 중괄호를 닫는없는PHP 파일에서이 구문 분석 오류를 어떻게 수정합니까?

if (login($email, $password, $mysqli) == true) { 

에 대한 중괄호를 닫는없는

<?php 
    include_once 'connect.php'; 
    include_once 'functions.php'; 

    sec_session_start(); // Our custom secure way of starting a PHP session. 

    if (isset($_POST['email'], $_POST['p'])) { 
     $email = $_POST['email']; 
     $password = $_POST['p']; // The hashed password. 
     if (login($email, $password, $mysqli) == true) { 
      // Login success 
      header('Location: ../protected_page.php'); 
    ` //echo 'Login Successful'; 
     } 
     else { 
      // Login failed 
      header('Location: ../loginpage.php?error=1'); 
     //echo "Login Unsuccessful"; 
     } 
    } 
    else { 
     // The correct POST variables were not sent to this page. 
     echo "Invalid Request"; 
    } ?> 
+0

전체 파일입니까? – JRsz

답변

0

조건

if (isset($_POST['email'], $_POST['p'])) { 
0

어쩌면 'connect.php'또는 'functions.php'파일이됩니다 ''문자를 포함하십시오. 이 파일을 조사하십시오.

관련 문제