묻고답하기

php 에러

2014.10.11 13:31

forman

Parse error: syntax error, unexpected ')' in \inc\Template.php on line 252

 

이렇게 에러가 발생하는 데 아래 코드 뭐가 문제인지 아시는 분

 

 

252 번째줄 코드는 이거임                  $rootReal = implode( "/", ( array ) );

 

 

 

 

전체코드

 

function getcompilefile( $file )
    {
        if ( $this->webRoot )
        {
            $nowReal = str_replace( "\\", "/", realpath( "." ) );
            $nowVirtual = preg_replace( "/^\\/~[^\\/]+/", "", dirname( $_SERVER['PHP_SELF'] ) );
            $pos = strpos( $nowReal, $nowVirtual );
            if ( is_int( $pos ) )
            {
                $rootReal = substr( $nowReal, 0, $pos );
            }
            else
            {
                $depth = count( explode( "/", $nowVirtual ) ) - 1;
                $rootReal = implode( "/", ( array ) );
            }
            $this->webRoot = $rootReal;
        }
        else if ( preg_match( "/^\\//", $this->webRoot ) )
        {
            $this->webRoot = realpath( $this->webRoot );
        }
        if ( preg_match( "/^http:\\/\\//", $file ) )
        {
            $cfile = str_replace( "/", "%", $file );
        }
        else
        {
            if ( preg_match( "/^\\//", $file ) )
            {
                $cfile = str_replace( array( "\\", $this->webRoot ), array( "/", "" ), realpath( $file ) );
            }
            else
            {
                $cfile = $file;
            }
            if ( $this->mirror )
            {
                $cfile = str_replace( "/", "%", $cfile );
            }
        }
        return $cfile.".php";
    }