Subversion Repositories php-qbpwcf

Rev

Rev 81 | Rev 226 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 81 Rev 99
Line 27... Line 27...
27
 
27
 
28
#初始化輸出
28
#初始化輸出
29
$output=array();
29
$output=array();
30
 
30
 
31
#取得 lib path
31
#取得 lib path
32
exec("php -f ".escapeshellarg(pathinfo(__FILE__)["dirname"]."/../../../usr/bin/libexec/folderOfUsrLib.php"),$output,$status);
32
exec("php -f ".escapeshellarg(pathinfo(__FILE__)["dirname"]."/../../../../usr/bin/libexec/folderOfUsrLib.php"),$output,$status);
33
 
33
 
34
#如果執行失敗
34
#如果執行失敗
35
if($status!==0){
35
if($status!==0){
36
 
36
 
37
	#debug
37
	#debug
Line 47... Line 47...
47
 
47
 
48
#初始化輸出
48
#初始化輸出
49
$output=array();
49
$output=array();
50
 
50
 
51
#以該檔案的實際位置的 lib path 為 include path 首位
51
#以該檔案的實際位置的 lib path 為 include path 首位
52
exec("cd ".pathinfo(__FILE__)["dirname"]."/../../../usr/".$folderOfUsrLib."/qbpwcf;pwd;",$output,$status);
52
exec("cd ".pathinfo(__FILE__)["dirname"]."/../../../../usr/".$folderOfUsrLib."/qbpwcf;pwd;",$output,$status);
53
set_include_path($output[0].PATH_SEPARATOR.get_include_path());
53
set_include_path($output[0].PATH_SEPARATOR.get_include_path());
54
 
54
 
55
#匯入套件
55
#匯入套件
56
require_once("allInOne.php");
56
require_once("allInOne.php");
57
 
57
 
Line 73... Line 73...
73
#$result["statusCode"],執行結果狀態碼.
73
#$result["statusCode"],執行結果狀態碼.
74
#必填參數:
74
#必填參數:
75
#$conf["command"],字串,要執行的指令.
75
#$conf["command"],字串,要執行的指令.
76
$conf["command"]="ps auxwf | cat";
76
$conf["command"]="ps auxwf | cat";
77
#$conf["fileArgu"],字串,變數__FILE__的內容.
77
#$conf["fileArgu"],字串,變數__FILE__的內容.
78
$conf["fileArgu"]=__FILE__;		
78
$conf["fileArgu"]=__FILE__;
79
#可省略參數:
79
#可省略參數:
80
#$conf["doNotRun"],字串,"true"代表不執行指令,預設為"false"會執行指令.
80
#$conf["doNotRun"],字串,"true"代表不執行指令,預設為"false"會執行指令.
81
#$conf["doNotRun"]="false";
81
#$conf["doNotRun"]="false";
82
#$conf["leftLogFile"],字串,預設為"false"代表要將 log 檔案移除;"true"代表要保留log檔案.
82
#$conf["leftLogFile"],字串,預設為"false"代表要將 log 檔案移除;"true"代表要保留log檔案.
83
#$conf["leftLogFile"]="true";
83
#$conf["leftLogFile"]="true";