Subversion Repositories qbpwcf-lib(archive)

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
822 liveuser 1
<?php
2
 
3
#使用命名空間qbpwcf
4
namespace qbpwcf;
5
 
6
#assets dir
7
$assetsDir="assets of phpLib::getFunctionConstruction_20241201";
8
 
9
#函式說明:
10
#取得函式的結構
11
#回傳結果:
12
#$result["status"],執行是否成功"true"代表執行成功,"false"代表執行失敗
13
#$result["error"],錯誤訊息陣列
14
#$result["function"],當前執行的函數名稱.
15
#$result["functionComment"],函式的註解全文.
16
#$result["content"],函式的程式內容字串.
17
#$result["comment"],函式說明
18
#$result["argvType"],傳入參數的型態,""表示不用參數
19
#$result["returnVarType"],回傳的變數型態,目前尚無法判斷其型態為string、int、float、double、boolean的哪一個,所以先一律視為"string"
20
#$result["return"]["name"],回傳的變數名稱
21
#$result["return"]["comment"],回傳的變數註解
22
#$result["mustBeFilled"]["dataCount"],不可省略的參數陣列元素數量 
23
#$result["optionalFilled"]["dataCount"],可省略的參數陣列元素數量
24
#$result["mustBeFilled"]["name"],不可省略的參數陣列
25
#$result["mustBeFilled"]["comment"],不可省略的參數註解陣列
26
#$result["optionalFilled"]["name"],可省略的參數陣列
27
#$result["optionalFilled"]["comment"],可省略的參數註解陣列
28
#$result["reference"]["addr"],參考資料的網址
29
#$result["reference"]["comment"],參考資料的說明
30
#必填參數:
31
#$conf["phpFileAddress"],字串,含有函式內容的php檔案位置與名稱
32
$conf["phpFileAddress"]=$assetsDir."/variableCheck.php";
33
#$conf["functionName"],字串,函式的名稱
34
$conf["functionName"]="checkArguments";
35
#$conf["fileArgu"],字串,__FILE__的內容.
36
$conf["fileArgu"]=__FILE__;
37
#可省略參數:
38
#$conf["web"],字串,"true"代表檔案是放在web環境;"false"是代表在檔案系統環境,預設為"false".
39
#$conf["web"]="false";
40
#參考資料:
41
#無.
42
#備註:
43
#無.
44
$getFunctionConstruction=phplib::getFunctionConstruction($conf);
45
unset($conf);
46
 
47
#如果執行失敗
48
if($getFunctionConstruction["status"]==="false"){
49
 
50
	#函式說明:
51
	#撰寫log
52
	#回傳結果:
53
	#$result["status"],狀態,"true"或"false".
54
	#$result["error"],錯誤訊息陣列.
55
	#$result["function"],當前函式的名稱.
56
	#$result["argu"],使用的參數.
57
	#必填參數:
58
	#$conf["path"],字串,log檔案的路徑與名稱.
59
	$conf["path"]=$logFile;
60
	#$conf["content"],any,要寫的內容,若內容不為字串則會用var_dump的格式寫入.
61
	$conf["content"]=$getFunctionConstruction;
62
	#$conf["fileArgu"],字串,php變數__FILE__的內容,亦即該檔案在檔案系統的絕對路徑
63
	$conf["fileArgu"]=__FILE__;
64
	#可省略參數:
65
	#$conf["rewrite"],預設為"false",接續寫入;反之"true"代表重新寫入.
66
	#$conf["rewrite"]="false";
67
	#參考資料:
68
	#無.
69
	#備註:
70
	#無.
71
	$record=logs::record($conf);
72
	unset($conf);
73
 
74
	#結束執行
75
	exit(1);
76
 
77
	}#if end
78
 
79
#debug
80
var_dump($getFunctionConstruction);