D

그누보드에서 쿼리문 보내려는데요

include_once("../_common.php");
require('./config.php') ;
require('./util.php') ;
require('./io.php') ;
require('./commands.php') ;
require('./phpcompat.php') ;

function SendError( $number, $text )
{
SendUploadResults( $number, '', '', $text ) ;
}


// Check if this uploader has been enabled.
if ( !$Config['Enabled'] )
SendUploadResults( '1', '', '', 'This file uploader is disabled. Please check the "editor/filemanager/connectors/php/config.php" file' ) ;

$sCommand = 'QuickUpload' ;

// The file type (from the QueryString, by default 'File').
$sType = isset( $_GET['Type'] ) ? $_GET['Type'] : 'File' ;

$sCurrentFolder = GetCurrentFolder() ;

// Is enabled the upload?
if ( ! IsAllowedCommand( $sCommand ) )
SendUploadResults( '1', '', '', 'The ""' . $sCommand . '"" command isn\'t allowed' ) ;

// Check if it is an allowed type.
if ( !IsAllowedType( $sType ) )
    SendUploadResults( 1, '', '', 'Invalid type specified' ) ;


FileUpload( $sType, $sCurrentFolder, $sCommand )
sql_query(" insert into g4_fckeditor_file ( bo_table, wr_id, bf_source, bf_file ) values ( 'test1', 'test', '$sOriginalFileName', '$sFileName' ) ");


위 소스와 같이 common 인클루드하고 쿼리문 보내는데 보내지지가 않네요?
왜그런거죠..?
혹시 인클루드 경로가 잘못된건가요? ../ 하면 최상단이라고 알고있거든요 
( 그누보드 또한 최상단에 있습니다. )
( 위 소스가 들어있는 php는 그누보드루트/editor/editor/filemanager/connectors/php 입니다. )
|

댓글 2개

.. 는 상위디렉터리를 말합니다.
../../../../.. 라고 해야 최상위가 될 것 같네요
include_once("../_common.php");<==이건 connectors 폴더에서 찾게 되겠죠?
그리고 _common.php를 include 하는 것과 common.php를 include 하는 것은 차이가 있습니다
_common.php에서 해당 스크립트의 경로를 설정하기 때문입니다

위 스크립트는 이렇게 해야 할 것 같군요
$g4_path="../../../../.."; //common.php를 직접 인클루드 하려면 $g4_path 변수가 반드시 있어야함
include_once("$g4_path/common.php");
이렇게 해야 해당 화일에서 $g4[path] 같은 변수를 사용할 수 잇습니다
댓글을 작성하시려면 로그인이 필요합니다.

자유게시판

203,294건
+
제목 글쓴이 날짜 조회
10-01-17 조회 3,620
10-01-17 조회 1,271
10-01-17 조회 1,867
10-01-17 조회 5,439
10-01-17 조회 1,449
10-01-17 조회 1,541
10-01-17 조회 1,722
10-01-17 조회 1,799
10-01-16 조회 1,943
10-01-16 조회 1,583
10-01-16 조회 2,484
10-01-16 조회 5,149
10-01-16 조회 1,838
10-01-16 조회 1,454
10-01-16 조회 3,573
10-01-16 조회 1,447
10-01-16 조회 2,078
10-01-16 조회 1,882
10-01-16 조회 1,934
10-01-16 조회 1,904