Subversion Repositories qbpwcf-lib(archive)

Rev

Rev 923 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 923 Rev 954
Line 41... Line 41...
41
*/
41
*/
42
 
42
 
43
#指派命名空間
43
#指派命名空間
44
namespace qbpwcf;
44
namespace qbpwcf;
45
 
45
 
-
 
46
#取得 lib path
-
 
47
exec("php -f ".escapeshellarg(pathinfo(__FILE__)["dirname"]."/libexec/folderOfUsrLib.php"),$output,$status);
-
 
48
 
-
 
49
#如果執行失敗
-
 
50
if($status!==0){
-
 
51
 
-
 
52
	#debug
-
 
53
	var_dump(__LINE__,$output);
-
 
54
 
-
 
55
	#結束執行,回傳shell 1.
-
 
56
	exit(1);
-
 
57
 
-
 
58
	}#if end
-
 
59
 
-
 
60
#儲存lib path
-
 
61
$folderOfUsrLib=$output[0];
-
 
62
 
46
#以該檔案的實際位置的 lib path 為 include path 首位
63
#以該檔案的實際位置的 lib path 為 include path 首位
-
 
64
$output=array();
47
exec("cd ".pathinfo(__FILE__)["dirname"]."/../lib/qbpwcf;pwd;",$output,$status);
65
exec("cd ".escapeshellarg(pathinfo(__FILE__)["dirname"]."/../".$folderOfUsrLib."/qbpwcf").";pwd;",$output,$status);
-
 
66
 
-
 
67
#如果執行失敗
-
 
68
if($status!==0){
-
 
69
 
-
 
70
	#debug
-
 
71
	var_dump(__LINE__,$output);
-
 
72
 
-
 
73
	#結束執行,回傳shell 1.
-
 
74
	exit(1);
-
 
75
 
-
 
76
	}#if end
-
 
77
 
-
 
78
#設置 include path 
48
set_include_path($output[0].PATH_SEPARATOR.get_include_path());
79
set_include_path($output[0].PATH_SEPARATOR.get_include_path());
49
 
80
 
50
#匯入外部套件
81
#匯入外部套件
51
include("allInOne.php");
82
include("allInOne.php");
52
 
83
 
53
#當前路徑
84
#當前路徑
54
$pwd=$output[0];
85
$pwd=$output[0];
55
 
86
 
56
#unix socket 的位置
87
#unix socket 的位置
57
$unixSocket=$pwd."/".basename(__FILE__).".sock";
88
$unixSocket=$pwd."../../var/qbpwcf/".basename(__FILE__).".sock";
58
 
89
 
59
#提示unix domain socket位置
90
#提示unix domain socket位置
60
echo "unix domain socket used at ".$unixSocket;
91
echo "unix domain socket used at ".$unixSocket;
61
 
92
 
62
#初始化儲存上次各log的時間
93
#初始化儲存上次各log的時間