Subversion Repositories php-qbpwcf

Rev

Rev 255 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 255 Rev 288
Line 15316... Line 15316...
15316
 
15316
 
15317
						}#if end
15317
						}#if end
15318
 
15318
 
15319
					#剔除 value 前面的空白
15319
					#剔除 value 前面的空白
15320
					#函式說明:
15320
					#函式說明:
15321
					#將字串特定關鍵字與其前面的內容剔除
15321
					#移除字串開頭的特定內容
15322
					#回傳結果:
15322
					#回傳結果:
15323
					#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
15323
					#$result["status"],寄信的情況,若爲"true",則十之八九沒有問題.
15324
					#$result["error"],錯誤訊息陣列.
15324
					#$result["error"],錯誤訊息陣列.
15325
					#$result["warning"],警告訊息鎮列.
-
 
15326
					#$result["founded"],有無找到定字串"true"代表有,"false"代表沒有.
-
 
15327
					#$result["function"],當前執行的函數名稱.
15325
					#$result["function"],當前執行的函數.
15328
					#$result["oriStr"],要處理的原始字串內容.
15326
					#$result["content"],處理好的字串.
15329
					#$result["content"],處理好的的字串內容.
15327
					#$result["argu"],使用的參數.
15330
					#必填參數:
15328
					#必填參數:
15331
					#$conf["stringIn"],字串,要處理的字串.
15329
					#$conf["inputStr"],字串,要檢查並移除開頭有 $conf["keyWords"] 的字串.
15332
					$conf["stringProcess::delStrBeforeKeyWord"]["stringIn"]=$delStrBeforeKeyWord["content"];
15330
					$conf["stringProcess::delKeyWordsInStrHead"]["inputStr"]=$delStrBeforeKeyWord["content"];
15333
					#$conf["keyWord"],字串,特定字串.
15331
					#$conf["keyWord"],字串,要移除的字串開頭關鍵字.
15334
					$conf["stringProcess::delStrBeforeKeyWord"]["keyWord"]=" ";
15332
					$conf["stringProcess::delKeyWordsInStrHead"]["keyWord"]=" ";
15335
					#可省略參數:
15333
					#可省略參數:
15336
					#$conf["recursive"],字串,預設為"false"代表找到一個關鍵字就會停止;"true"代表會即重複執行,直到沒有關鍵字為止.
15334
					#$conf["recursive"],字串,"true"代表要遞迴移除開頭的關鍵字,預設為"false",只移除開頭關鍵字1次.
15337
					$conf["stringProcess::delStrBeforeKeyWord"]["recursive"]="true";
15335
					$conf["stringProcess::delKeyWordsInStrHead"]["recursive"]="true";
15338
					#參考資料:
15336
					#參考資料:
15339
					#無.
15337
					#無.
15340
					#備註:
15338
					#備註:
15341
					#無.
15339
					#無.
15342
					$delStrBeforeKeyWord=stringProcess::delStrBeforeKeyWord($conf["stringProcess::delStrBeforeKeyWord"]);
15340
					$delKeyWordsInStrHead=stringProcess::delKeyWordsInStrHead($conf["stringProcess::delKeyWordsInStrHead"]);
15343
					unset($conf["stringProcess::delStrBeforeKeyWord"]);
15341
					unset($conf["stringProcess::delKeyWordsInStrHead"]);
15344
 
15342
 
15345
					#如果執行失敗
15343
					#如果執行失敗
15346
					if($delStrBeforeKeyWord["status"]==="false"){
15344
					if($delKeyWordsInStrHead["status"]==="false"){
15347
 
15345
 
15348
						#設置執行失敗
15346
						#設置執行失敗
15349
						$result["status"]="false";
15347
						$result["status"]="false";
15350
 
15348
 
15351
						#設置執行失敗訊息
15349
						#設置執行失敗訊息
15352
						$result["error"]=$delStrBeforeKeyWord;
15350
						$result["error"]=$delKeyWordsInStrHead;
15353
 
15351
 
15354
						#回傳結果
15352
						#回傳結果
15355
						return $result;
15353
						return $result;
15356
 
15354
 
15357
						}#if end
15355
						}#if end
15358
 
15356
 
15359
					#取得找到的變數
15357
					#取得找到的變數
15360
					eval("\$result[\"content\"][\"".$keyWord."\"][]=".$delStrBeforeKeyWord["content"]);
15358
					eval("\$result[\"content\"][\"".$keyWord."\"][]=".$delKeyWordsInStrHead["content"]);
15361
 
15359
 
15362
					}#if end
15360
					}#if end
15363
 
15361
 
15364
				}#foreach end
15362
				}#foreach end
15365
 
15363