Subversion Repositories php-qbpwcf

Rev

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

Rev 3 Rev 226
Line 1... Line 1...
1
#!/usr/bin/php
1
#!/usr/bin/php
2
<?php
2
<?php
3
 
3
 
4
/*
4
/*
5
	QBPWCF, Quick Build PHP website Component base on Fedora Linux.
5
	QBPWCF, Quick Build PHP website Component base on Fedora Linux.
6
    Copyright (C) 2015~2024 Min-Jhin,Chen
6
    Copyright (C) 2014~2025 MIN ZHI, CHEN
7
 
7
 
8
    This file is part of QBPWCF.
8
    This file is part of QBPWCF.
9
 
9
 
10
    QBPWCF is free software: you can redistribute it and/or modify
10
    QBPWCF is free software: you can redistribute it and/or modify
11
    it under the terms of the GNU General Public License as published by
11
    it under the terms of the GNU General Public License as published by
Line 17... Line 17...
17
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
    GNU General Public License for more details.
18
    GNU General Public License for more details.
19
 
19
 
20
    You should have received a copy of the GNU General Public License
20
    You should have received a copy of the GNU General Public License
21
    along with QBPWCF.  If not, see <http://www.gnu.org/licenses/>.
21
    along with QBPWCF.  If not, see <http://www.gnu.org/licenses/>.
22
    
22
 
23
*/
23
*/
24
 
24
 
25
#使用命名空間qbpwcf
25
#使用命名空間qbpwcf
26
namespace qbpwcf;
26
namespace qbpwcf;
27
 
27
 
Line 55... Line 55...
55
	#結束執行,回傳shell 1.
55
	#結束執行,回傳shell 1.
56
	exit(1);
56
	exit(1);
57
 
57
 
58
	}#if end
58
	}#if end
59
 
59
 
60
#設置 include path 
60
#設置 include path
61
set_include_path($output[0].PATH_SEPARATOR.get_include_path());
61
set_include_path($output[0].PATH_SEPARATOR.get_include_path());
62
 
62
 
63
#匯入外部套件
63
#匯入外部套件
64
include("allInOne.php");
64
include("allInOne.php");
65
 
65
 
66
#如果有參數
66
#如果有參數
67
if(isset($_SERVER["argv"][1]))
67
if(isset($_SERVER["argv"][1]))
68
{
68
{
69
	#解析成陣列
69
	#解析成陣列
70
	$array=(array)json_decode(urldecode(base64_decode($_SERVER["argv"][1])));	
70
	$array=(array)json_decode(urldecode(base64_decode($_SERVER["argv"][1])));
71
	
71
 
72
	#顯示目前的陣列結構
72
	#顯示目前的陣列結構
73
	var_dump($array);
73
	var_dump($array);
74
 
74
 
75
}#if end
75
}#if end
76
 
76
 
Line 93... Line 93...
93
	#可省略的參數:
93
	#可省略的參數:
94
	#$conf["newLineBreak"],字串,是否$conf["commentsArray"]的每個元素後面都要斷行,"false"代表不要,預設為"true"要斷行.
94
	#$conf["newLineBreak"],字串,是否$conf["commentsArray"]的每個元素後面都要斷行,"false"代表不要,預設為"true"要斷行.
95
	#$conf["newLineBreak"]="false";
95
	#$conf["newLineBreak"]="false";
96
	$readLine=cmd::readLine($conf);
96
	$readLine=cmd::readLine($conf);
97
	unset($conf);
97
	unset($conf);
98
	
98
 
99
	#如果讀取失敗
99
	#如果讀取失敗
100
	if($readLine["status"]==="false")
100
	if($readLine["status"]==="false")
101
	{
101
	{
102
		#初始化結果
102
		#初始化結果
103
		$result=array();
103
		$result=array();
104
		
104
 
105
		#設置執行失敗
105
		#設置執行失敗
106
		$result["status"]="false";
106
		$result["status"]="false";
107
		
107
 
108
		#設置執行錯誤
108
		#設置執行錯誤
109
		$result["error"]=$readLine;
109
		$result["error"]=$readLine;
110
		
110
 
111
		#印出結果
111
		#印出結果
112
		var_dump($result);
112
		var_dump($result);
113
	
113
 
114
	}#if end
114
	}#if end
115
 
115
 
116
	#讀取到的內容
116
	#讀取到的內容
117
	$key=$readLine["content"];
117
	$key=$readLine["content"];
118
 
118
 
Line 134... Line 134...
134
	#可省略的參數:
134
	#可省略的參數:
135
	#$conf["newLineBreak"],字串,是否$conf["commentsArray"]的每個元素後面都要斷行,"false"代表不要,預設為"true"要斷行.
135
	#$conf["newLineBreak"],字串,是否$conf["commentsArray"]的每個元素後面都要斷行,"false"代表不要,預設為"true"要斷行.
136
	#$conf["newLineBreak"]="false";
136
	#$conf["newLineBreak"]="false";
137
	$readLine=cmd::readLine($conf);
137
	$readLine=cmd::readLine($conf);
138
	unset($conf);
138
	unset($conf);
139
	
139
 
140
	#如果讀取失敗
140
	#如果讀取失敗
141
	if($readLine["status"]==="false")
141
	if($readLine["status"]==="false")
142
	{
142
	{
143
		#初始化結果
143
		#初始化結果
144
		$result=array();
144
		$result=array();
145
		
145
 
146
		#設置執行失敗
146
		#設置執行失敗
147
		$result["status"]="false";
147
		$result["status"]="false";
148
		
148
 
149
		#設置執行錯誤
149
		#設置執行錯誤
150
		$result["error"]=$readLine;
150
		$result["error"]=$readLine;
151
		
151
 
152
		#印出結果
152
		#印出結果
153
		var_dump($result);
153
		var_dump($result);
154
	
154
 
155
	}#if end
155
	}#if end
156
 
156
 
157
	#讀取到的內容
157
	#讀取到的內容
158
	$value=$readLine["content"];
158
	$value=$readLine["content"];
159
 
159