Subversion Repositories php-qbpwcf

Rev

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

Rev 190 Rev 200
Line 964... Line 964...
964
		#$result["warning"],警告訊息.
964
		#$result["warning"],警告訊息.
965
		#$result["function"],當前執行的函數名稱.
965
		#$result["function"],當前執行的函數名稱.
966
		#$result["fileContent"],爲檔案的內容陣列.
966
		#$result["fileContent"],爲檔案的內容陣列.
967
		#$result["lineCount"],爲檔案內容總共的行數.
967
		#$result["lineCount"],爲檔案內容總共的行數.
968
		#$result["fullContent"],為檔案的完整內容.
968
		#$result["fullContent"],為檔案的完整內容.
969
		#$result["base64data"],為檔案的base64內容.
969
		#$result["base64dataOnly"],檔案的base64data.
-
 
970
		#$result["base64data"],為在網頁上給予src參數的數值.
970
		#$result["mimeType"],為檔案的mime type.
971
		#$result["mimeType"],為檔案的mime type.
971
		#必填參數:
972
		#必填參數:
972
		#$conf["filePositionAndName"],字串,爲檔案的位置以及名稱.
973
		#$conf["filePositionAndName"],字串,爲檔案的位置以及名稱.
973
		$conf["fileAccess::getFileContent"]["filePositionAndName"]=$conf["imgPosition"];
974
		$conf["fileAccess::getFileContent"]["filePositionAndName"]=$conf["imgPosition"];
974
		#$conf["fileArgu"],字串,php變數__FILE__的內容,亦即該檔案在檔案系統的絕對路徑
975
		#$conf["fileArgu"],字串,php變數__FILE__的內容,亦即該檔案在檔案系統的絕對路徑
Line 1123... Line 1124...
1123
			#取得樣式字串
1124
			#取得樣式字串
1124
			$style=$styleStr["content"];
1125
			$style=$styleStr["content"];
1125
			
1126
			
1126
			}#if end
1127
			}#if end
1127
		
1128
		
1128
		#如果未設置 mime type
1129
		#如果有設置 mime type
1129
		if(!isset($conf["mimeType"])){
1130
		if(isset($conf["mimeType"])){
1130
		
-
 
1131
			#設置自動取得的mime tpye
-
 
1132
			$conf["mimeType"]=$getFileContent["mimeType"];
-
 
1133
		
1131
		
-
 
1132
			#設置 img 的 src 數值
-
 
1133
			$result["content"]["imgWithoutImgTag"]="data:".$conf["mimeType"].";".$conf["compressType"].",".$getFileContent["base64data"];
-
 
1134
				
1134
			}#if end
1135
			}#if end
1135
		
1136
		
-
 
1137
		#反之
-
 
1138
		else{
-
 
1139
		
1136
		#設置 img 的 src 數值
1140
			#設置 img 的 src 數值
1137
		$result["content"]["imgWithoutImgTag"]="data:".$conf["mimeType"].";".$conf["compressType"].",".$getFileContent["base64data"];
1141
			$result["content"]["imgWithoutImgTag"]=$getFileContent["base64data"];
-
 
1142
		
-
 
1143
			}#else end
1138
 
1144
		
1139
		#放置圖片的語法
1145
		#放置圖片的語法
1140
		$result["content"]["img"]="<img ".$style." ".$conf["alt"]." ".$conf["class"]." src=\"".$result["content"]["imgWithoutImgTag"]."\" >";
1146
		$result["content"]["img"]="<img ".$style." ".$conf["alt"]." ".$conf["class"]." src=\"".$result["content"]["imgWithoutImgTag"]."\" >";
1141
		
1147
		
1142
		#執行到這邊代表執行正常
1148
		#執行到這邊代表執行正常
1143
		$result["status"]="true";
1149
		$result["status"]="true";