2011-08-15 2 views
0

나는 내 모델 내에서 함수 호출에가 .cgi 파일을 사용하려면 :된답니다가 .cgi 파일

function execute_shell_command($userID,$clientname){ 

    $shell_script_to_execute="jobscript.cgi"; 
    $jobtype="clientjob"; 

    echo shell_exec("bash '".$shell_script_to_execute."' '".$jobtype."' '".$userID."' '".$clientname."' '".$this->job_command."' '".$this->job_id."' '".$this->servername."' '".$this->rootaccess."' "); 

} 

가 어떻게이 CGI 파일을로드 할, 지금 내가 넣어 위치를 알 수 없습니다. 내 자산 폴더에 있습니까? 그냥 CodeIgniter의에서 할 수있는 좋은 방법을 찾고 CodeIgniter의에서

답변

0

파일 경로는 당신의 cgi-bin 디렉토리가

$shell_script_to_execute = "./cgi-bin/jobscript.cgi"; 

index.php 작동합니다 당신과 같은 수준에 앉아 그렇다면 항상 index.php를 기준으로합니다. ..