Subversion Repositories php-qbpwcf

Rev

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

Rev 81 Rev 220
Line 27... Line 27...
27
 
27
 
28
#assets dir
28
#assets dir
29
$assetsDir="assets_of_phpLib::updateCopyRightYear_20250122";
29
$assetsDir="assets_of_phpLib::updateCopyRightYear_20250122";
30
 
30
 
31
#函式說明:
31
#函式說明:
-
 
32
#使用 linux 的 uuid 指令來產生 uuid 字串
-
 
33
#回傳結果:
-
 
34
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
-
 
35
#$result["error"],錯誤訊息.
-
 
36
#$result["function"],當前執行的函式名稱.
-
 
37
#$result["content"],uuid.
-
 
38
#必填參數:
-
 
39
#無.
-
 
40
#可省略參數:
-
 
41
#無.
-
 
42
#參考資料:
-
 
43
#無.
-
 
44
#備註:
-
 
45
#無.
-
 
46
$uuid=cmd::uuid();
-
 
47
 
-
 
48
#如果執行失敗
-
 
49
if($uuid["status"]==="false"){
-
 
50
 
-
 
51
	#debug
-
 
52
	var_dump($uuid);
-
 
53
	
-
 
54
	#結束執行回傳代碼1給shell
-
 
55
	exit(1);
-
 
56
 
-
 
57
	}#if end
-
 
58
 
-
 
59
#函式說明:
32
#更新程式檔案開頭版權宣告的年份
60
#更新程式檔案開頭版權宣告的年份
33
#回傳結果:
61
#回傳結果:
34
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
62
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
35
#$reuslt["error"],執行不正常結束的錯訊息陣列.
63
#$reuslt["error"],執行不正常結束的錯訊息陣列.
36
#$result["function"],當前執行的函式名稱.
64
#$result["function"],當前執行的函式名稱.
Line 47... Line 75...
47
#$conf["yearTo"]=gmdate('Y');
75
#$conf["yearTo"]=gmdate('Y');
48
#$conf["Authors"],陣列,該套件的參與者,預設為array("Min-Jhin,Chen");
76
#$conf["Authors"],陣列,該套件的參與者,預設為array("Min-Jhin,Chen");
49
#$conf["Authors"]=array("Min-Jhin,Chen");
77
#$conf["Authors"]=array("Min-Jhin,Chen");
50
#$conf["searchPath"],陣列,要搜尋哪些地方的檔案要更新版權宣告年份,預設為使用中的本套件位置.
78
#$conf["searchPath"],陣列,要搜尋哪些地方的檔案要更新版權宣告年份,預設為使用中的本套件位置.
51
#$conf["searchParh"]=array("");
79
#$conf["searchParh"]=array("");
-
 
80
#$conf["skipHiddenFolder"],字串,要略過隱藏的資料夾,預設為"true";反之為"false";
-
 
81
#$conf["skipHiddenFolder"]="true";
-
 
82
#$conf["includeHiddenFolder"],陣列,符合名稱的隱藏資料夾會存取,預設不指定;
-
 
83
#$conf["includeHiddenFolder"]=array("");
-
 
84
#$conf["excludeDirName"],陣列,哪些目錄名稱要忽略,預設有"free-lib"、"no-free-lib"、"composer".
-
 
85
#$conf["excludeDirName"]=array("free-lib","no-free-lib","composer");
-
 
86
#$conf["excludeMineType"],陣列,哪些檔案類型要忽略,預設有"image/*"、"video/*"、"audio/*"、"media/*"、"application/*".
-
 
87
#$conf["excludeMineType"]=array("image/*","video/*","audio/*","media/*","application/*");
-
 
88
#$conf["excludeSecondName"],陣列,哪些附檔名的檔案要忽略,預設有"log"、"csv"、"sql"、"js"、"css"、"html".
-
 
89
#$conf["excludeSecondName"]=array("log"、,"csv","sql","js","css","html");
-
 
90
#$conf["multiThread"],字串,是否要啟用多執行序,預設為"false",反之為"true".
-
 
91
#$conf["multiThread"]="";
-
 
92
#$conf["threadType"],字串,當"multiThread"參數為"true"時,要使用的threas類型,預設為"socket",其他可能有"proc".
-
 
93
#$conf["threadType"]="socket";
-
 
94
#$conf["socket"],字串,unix domain socket 的位置與名稱,預設為 qbpwcf_usock_path;
-
 
95
$conf["socket"]="assets of sock::unixDomainSockServer_20250228/unixDomainSockServer.sock";
-
 
96
#$conf["log"],字串,log的檔案位置與名稱,預設不使用.
-
 
97
$conf["log"]="/tmp/phpLib::updateCopyRightYear:20250122-".$uuid["content"].".log";
-
 
98
#$conf["outputPath"],字串,更新後的檔案內容要存放到哪個路徑低下,預設為 /tmp 底下.
-
 
99
#$conf["outputPath"]="";
52
#參考資料:
100
#參考資料:
53
#無.
101
#無.
54
#備註:
102
#備註:
55
#無.
103
#無.
56
$updateCopyRightYear=phpLib::updateCopyRightYear($conf);
104
$updateCopyRightYear=phpLib::updateCopyRightYear($conf);