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] 같은 변수를 사용할 수 잇습니다
댓글을 작성하시려면 로그인이 필요합니다. 로그인

자유게시판

+
제목 글쓴이 날짜 조회
16년 전 조회 1,344
16년 전 조회 1,440
16년 전 조회 1,621
16년 전 조회 1,678
16년 전 조회 1,825
16년 전 조회 1,467
16년 전 조회 2,336
16년 전 조회 5,023
16년 전 조회 1,720
16년 전 조회 1,321
16년 전 조회 3,434
16년 전 조회 1,350
16년 전 조회 1,962
16년 전 조회 1,757
16년 전 조회 1,828
16년 전 조회 1,815
16년 전 조회 3,551
16년 전 조회 1,562
16년 전 조회 1,273
16년 전 조회 1,826
16년 전 조회 1,825
16년 전 조회 1,301
16년 전 조회 2,175
16년 전 조회 1,396
16년 전 조회 2,013
16년 전 조회 1,695
16년 전 조회 1,358
16년 전 조회 5,704
16년 전 조회 1,263
16년 전 조회 1,513
🐛 버그신고