그누보드에서 쿼리문 보내려는데요 > 자유게시판

자유게시판

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

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

본문

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 입니다. )
추천
0
  • 복사

댓글 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] 같은 변수를 사용할 수 잇습니다
© SIRSOFT
현재 페이지 제일 처음으로