Subversion Repositories php-qbpwcf

Rev

Rev 226 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
7 liveuser 1
<?php
2
 
3
/*
4
 
5
        QBPWCF, Quick Build PHP website Component base on Fedora Linux.
239 liveuser 6
    Copyright (C) 2014~2026 MIN ZHI, CHEN
7 liveuser 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
#使用命名空間qbpwcf
26
namespace qbpwcf;
27
 
28
#assets dir
29
$assetsDir="assets of phpLib::getFunctionConstruction_20241201";
30
 
31
#函式說明:
32
#取得函式的結構
33
#回傳結果:
34
#$result["status"],執行是否成功"true"代表執行成功,"false"代表執行失敗
35
#$result["error"],錯誤訊息陣列
36
#$result["function"],當前執行的函數名稱.
37
#$result["functionComment"],函式的註解全文.
38
#$result["content"],函式的程式內容字串.
39
#$result["comment"],函式說明
40
#$result["argvType"],傳入參數的型態,""表示不用參數
41
#$result["returnVarType"],回傳的變數型態,目前尚無法判斷其型態為string、int、float、double、boolean的哪一個,所以先一律視為"string"
42
#$result["return"]["name"],回傳的變數名稱
43
#$result["return"]["comment"],回傳的變數註解
226 liveuser 44
#$result["mustBeFilled"]["dataCount"],不可省略的參數陣列元素數量
7 liveuser 45
#$result["optionalFilled"]["dataCount"],可省略的參數陣列元素數量
46
#$result["mustBeFilled"]["name"],不可省略的參數陣列
47
#$result["mustBeFilled"]["comment"],不可省略的參數註解陣列
48
#$result["optionalFilled"]["name"],可省略的參數陣列
49
#$result["optionalFilled"]["comment"],可省略的參數註解陣列
50
#$result["reference"]["addr"],參考資料的網址
51
#$result["reference"]["comment"],參考資料的說明
52
#必填參數:
53
#$conf["phpFileAddress"],字串,含有函式內容的php檔案位置與名稱
54
$conf["phpFileAddress"]=$assetsDir."/variableCheck.php";
55
#$conf["functionName"],字串,函式的名稱
56
$conf["functionName"]="checkArguments";
57
#$conf["fileArgu"],字串,__FILE__的內容.
58
$conf["fileArgu"]=__FILE__;
59
#可省略參數:
60
#$conf["web"],字串,"true"代表檔案是放在web環境;"false"是代表在檔案系統環境,預設為"false".
61
#$conf["web"]="false";
62
#參考資料:
63
#無.
64
#備註:
65
#無.
66
$getFunctionConstruction=phplib::getFunctionConstruction($conf);
67
unset($conf);
68
 
69
#如果執行失敗
70
if($getFunctionConstruction["status"]==="false"){
71
 
72
	#函式說明:
73
	#撰寫log
74
	#回傳結果:
75
	#$result["status"],狀態,"true"或"false".
76
	#$result["error"],錯誤訊息陣列.
77
	#$result["function"],當前函式的名稱.
78
	#$result["argu"],使用的參數.
79
	#必填參數:
80
	#$conf["path"],字串,log檔案的路徑與名稱.
81
	$conf["path"]=$logFile;
82
	#$conf["content"],any,要寫的內容,若內容不為字串則會用var_dump的格式寫入.
83
	$conf["content"]=$getFunctionConstruction;
84
	#$conf["fileArgu"],字串,php變數__FILE__的內容,亦即該檔案在檔案系統的絕對路徑
85
	$conf["fileArgu"]=__FILE__;
86
	#可省略參數:
87
	#$conf["rewrite"],預設為"false",接續寫入;反之"true"代表重新寫入.
88
	#$conf["rewrite"]="false";
89
	#參考資料:
90
	#無.
91
	#備註:
92
	#無.
93
	$record=logs::record($conf);
94
	unset($conf);
226 liveuser 95
 
7 liveuser 96
	#結束執行
97
	exit(1);
98
 
99
	}#if end
226 liveuser 100
 
7 liveuser 101
#debug
102
var_dump($getFunctionConstruction);