Subversion Repositories qbpwcf-lib(archive)

Rev

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

Rev 791 Rev 846
Line 1... Line 1...
1
        QBPWCF, Quick Build PHP website Component base on Fedora Linux.
1
        QBPWCF, Quick Build PHP website Component base on Fedora Linux.
2
    Copyright (C) 2015~2024 Min-Jhin,Chen
2
    Copyright (C) 2015~2025 Min-Jhin,Chen
3
 
3
 
4
    This file is part of QBPWCF.
4
    This file is part of QBPWCF.
5
 
5
 
6
    QBPWCF is free software: you can redistribute it and/or modify
6
    QBPWCF is free software: you can redistribute it and/or modify
7
    it under the terms of the GNU General Public License as published by
7
    it under the terms of the GNU General Public License as published by
Line 133... Line 133...
133
作為對外部類別開放存取的函式,應該要宣告為public static function fName().
133
作為對外部類別開放存取的函式,應該要宣告為public static function fName().
134
作為僅對類別自己存取的函式,應該要宣告為private static function fName().
134
作為僅對類別自己存取的函式,應該要宣告為private static function fName().
135
 
135
 
136
建立含有參數的函式一開始的寫法可以如下:
136
建立含有參數的函式一開始的寫法可以如下:
137
 
137
 
-
 
138
/*
-
 
139
#函式說明:
-
 
140
#...
-
 
141
#回傳結果:
-
 
142
#$result["status"],"true"代表移除成功,"false"代表移除失敗.
-
 
143
#$result["error"],錯誤訊息陣列.
-
 
144
#$result["function"],當前執行的函數名稱.
-
 
145
#$result["content"],主要期望的回傳內容.
-
 
146
#必填參數:
-
 
147
#$conf["key"],字串,名為"key"的參數.
-
 
148
$conf["key"]="";
-
 
149
#$conf["fileArgu"],字串,__FILE__的內容.
-
 
150
$conf["fileArgu"]=__FILE__;
-
 
151
#可省略參數:
-
 
152
#無
-
 
153
#參考資料:
-
 
154
#無.
-
 
155
#備註:
-
 
156
#無
-
 
157
*/
138
function haveArgu(&conf){
158
function haveArgu(&conf){
139
 
159
 
140
	#初始化要回傳的結果
160
	#初始化要回傳的結果
141
	$result=array();
161
	$result=array();
142
 
162
 
Line 199... Line 219...
199
		#回傳結果
219
		#回傳結果
200
		return $result;
220
		return $result;
201
 
221
 
202
		}#if end
222
		}#if end
203
 
223
 
204
	}
224
	}//function haveArgu end
205
 
225
 
206
建立不含有必填參數的涵式一開始的寫法可以如下:
226
建立不含有必填參數的涵式一開始的寫法可以如下:
207
 
227
 
208
function noMustFilledArgu(&$conf){
228
function noMustFilledArgu(&$conf){
209
 
229