Subversion Repositories php-qbpwcf

Rev

Rev 226 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
3 liveuser 1
#!/usr/bin/php
2
<?php
3
 
4
/*
5
	QBPWCF, Quick Build PHP website Component base on Fedora Linux.
6
    Copyright (C) 2015~2024 Min-Jhin,Chen
7
 
8
    This file is part of QBPWCF.
9
 
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
12
    the Free Software Foundation, either version 3 of the License, or
13
    (at your option) any later version.
14
 
15
    QBPWCF is distributed in the hope that it will be useful,
16
    but WITHOUT ANY WARRANTY; without even the implied warranty of
17
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
    GNU General Public License for more details.
19
 
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/>.
22
 
23
*/
24
 
25
#如果不存在要處理的參數
26
if( !isset($_SERVER['argv'][1]) )
27
{
28
	#show help
29
	help();
30
 
31
	#停止執行
32
	exit;
33
}
34
 
35
#如果第參數為 "help" 或 "-h"
36
if( $_SERVER['argv'][1]==="help" || $_SERVER['argv'][1]==="-h" )
37
{
38
	#show help
39
	help();
40
 
41
	#停止執行
42
	exit;
43
 
44
}#if end
45
 
46
#印出結果
47
echo urldecode($_SERVER['argv'][1]).PHP_EOL;
48
 
49
#說明
50
function help()
51
{
52
	#說明
53
	echo $_SERVER['argv'][0]." string to urldecode".PHP_EOL;
54
}
55
 
56
?>