D

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

· 2010-01-16 (토) 15:33:14 · 1929 · 2
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,044건
+
제목 글쓴이 날짜 조회
10-01-16 조회 2,476
10-01-16 조회 5,142
10-01-16 조회 1,834
10-01-16 조회 1,442
10-01-16 조회 3,550
10-01-16 조회 1,437
10-01-16 조회 2,073
10-01-16 조회 1,875
10-01-16 조회 1,930
10-01-16 조회 1,901
10-01-16 조회 3,651
10-01-16 조회 1,654
10-01-16 조회 1,374
10-01-16 조회 1,926
10-01-16 조회 1,931
10-01-16 조회 1,404
10-01-16 조회 2,288
10-01-16 조회 1,520
10-01-16 조회 2,121
10-01-16 조회 1,894