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::getPhpLibConstruction_20241201";
8
 
9
#函式說明:
10
#取得php函式庫檔案裡面的結構.
11
#回傳結果:
12
#$result["status"],"true"表示取得成功;"false"表示取得失敗.
13
#$result["error"],錯誤訊息.
14
#$result["function"],當前執行的函數名稱.
15
#$result["namesapceCount"],命名空間的筆數.
16
#$result["classCount"],類別的筆數.
17
#$result["functionsCount"],函式的筆數.
18
#$result["namespace"],命名空間名稱的陣列,每個元素有"lineNo"記錄所在行數與"content"記錄名稱.
19
#$result["commentForNamespace"],每個命令空間對應的註解.
20
#$result["class"],類別的陣列,每個元素有"lineNo"記錄所在行數與"content"記錄名稱與"namespace"記錄所屬的命名空間名稱.
21
#$result["commentForClass"],每個類別對應的註解.
22
#$result["functions"],函式名稱資訊的陣列,每個元素有"namespace"記錄所屬的命名空間與"class"記錄所屬的類別名稱與"content"記錄名稱.
23
#必填參數:
24
#$conf["libFileAddress"]=,字串,要讀取的函式庫檔案位置
25
$conf["libFileAddress"]=$assetsDir."/db.php";
26
#$conf["fileArgu"],字串,__FILE__的內容.
27
$conf["fileArgu"]=__FILE__;
28
#可省略參數:
29
#$conf["web"],字串,"true"代表檔案是放在web環境;"false"是代表在檔案系統環境,預設為"false".
30
#$conf["web"]="true";
31
#參考資料:
32
#無.
33
#備註:
34
#無.
35
$getPhpLibConstruction=phpLib::getPhpLibConstruction($conf);
36
unset($conf);
37
 
38
#如果執行失敗
39
if($getPhpLibConstruction["status"]==="false"){
40
 
41
	#函式說明:
42
	#撰寫log
43
	#回傳結果:
44
	#$result["status"],狀態,"true"或"false".
45
	#$result["error"],錯誤訊息陣列.
46
	#$result["function"],當前函式的名稱.
47
	#$result["argu"],使用的參數.
48
	#必填參數:
49
	#$conf["path"],字串,log檔案的路徑與名稱.
50
	$conf["path"]=$logFile;
51
	#$conf["content"],any,要寫的內容,若內容不為字串則會用var_dump的格式寫入.
52
	$conf["content"]=$getPhpLibConstruction;
53
	#$conf["fileArgu"],字串,php變數__FILE__的內容,亦即該檔案在檔案系統的絕對路徑
54
	$conf["fileArgu"]=__FILE__;
55
	#可省略參數:
56
	#$conf["rewrite"],預設為"false",接續寫入;反之"true"代表重新寫入.
57
	#$conf["rewrite"]="false";
58
	#參考資料:
59
	#無.
60
	#備註:
61
	#無.
62
	$record=logs::record($conf);
63
	unset($conf);
64
 
65
	#結束執行
66
	exit(1);
67
 
68
	}#if end
69
 
70
#debug
71
var_dump($getPhpLibConstruction);