syntax error, unexpected end of file in 오류

홈페이지 오류가 나서요...

Parse error: syntax error, unexpected end of file in /host/home2/midnightorange/html/index.php on line 57

이렇게 뜨는데요... 괄호나 꺽쇠 어디가 안 맞는 건지 도저히 모르겠어서...;ㅅ;

아무리 고쳐봐도 나아지지를 않네요

<?php
include_once('/host/home2/midnightorange/html/index.php');
define('_INDEX_', true);

if(!$is_member && !$config['cf_open']) { 
{
    // 멤버가 아니고, 사이트 오픈이 되어 있지 않은 경우 로그인 페이지로 점프 시키기
    goto_url(G5_BBS_URL.'/login.php');

} { 
    if($config['cf_open']) {
        // 사이트 오픈이 되어 있을 경우
        if($is_member) {
            // 사이트 오픈이 되어 있고, 로그인이 끝났을 경우
            if (G5_IS_MOBILE) {
                include_once(G5_PATH.'/main.php');
                exit;
            }
            $index_url = "./main.php";
        } else {
            // 사이트 오픈이 되어 있고, 로그인이 안되어 있을 경우
            if (G5_IS_MOBILE) {
                include_once(G5_PATH.'/enter.php');
                exit;
            }
            $index_url = "./enter.php";
        }
        
    }

    if($index_url == "") {$index_url = "./enter.php";}

    include_once(G5_PATH.'/head.sub.php');
    add_stylesheet('<link rel="stylesheet" href="'.G5_CSS_URL.'/index.css">', 0);
?>

    <div id="site_bgm_box">
        <iframe src="./bgm.php?action=play" name="bgm_frame" id="bgm_frame" border="0" frameborder="0" marginheight="0" marginwidth="0" topmargin="0" scrolling="no" allowTransparency="true"></iframe>
    </div>
    <!-- 콘텐츠 시작 -->
    <div id="wrapper">
        <iframe src="<?=$index_url?>" name="frm_main" id="main" border="0" frameborder="0" marginheight="0" marginwidth="0" topmargin="0" scrolling="auto" allowTransparency="true"></iframe>
    </div>
    <script>
    $(document.body).on("keydown", this, function (event) {
        if (event.keyCode == 116) {
            document.getElementById('main').contentDocument.location.reload(true);
            return false;
        }
    });
    </script>

<?php
        {
    include_once(G5_PATH.'/tail.sub.php');
        }
?>

답변 3개 / 댓글 1개

2022-02-11 (금) 13:27:02

unexpected end of file

이 에러 메시지는 99.9%가 괄호 짝이 맞지 않는 경우 생깁니다.

2022-02-11 (금) 13:18:04

if(!$is_member && !$config['cf_open']) {
{

    // 멤버가 아니고, 사이트 오픈이 되어 있지 않은 경우 로그인 페이지로 점프 시키기
    goto_url(G5_BBS_URL.'/login.php');

} {

<?php
        {
    include_once(G5_PATH.'/tail.sub.php');
        }
?>

괄호 부분이 이상해요.

이렇게 바꿔야 하지 않을까요?

if(!$is_member && !$config['cf_open']) {

    // 멤버가 아니고, 사이트 오픈이 되어 있지 않은 경우 로그인 페이지로 점프 시키기
    goto_url(G5_BBS_URL.'/login.php');

}

<?php

include_once(G5_PATH.'/tail.sub.php');

?>

2022-02-11 (금) 12:04:26

/host/home2/midnightorange/html/index.php on line 57

여기가 어디인지는 얘기해주셔야죠 ㅠㅠ

답변에 대한 댓글 1개

57번째 줄 말씀이실까요?!
?> 부분입니다ㅠㅠ

답변을 작성하려면 로그인이 필요합니다.