| 1 |
liveuser |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
#使用命名空間qbpwcf
|
|
|
4 |
namespace qbpwcf;
|
|
|
5 |
|
|
|
6 |
#匯入外部套件
|
|
|
7 |
include("../allInOne.php");
|
|
|
8 |
|
|
|
9 |
#背景圖
|
|
|
10 |
#涵式說明:
|
|
|
11 |
#使用圖片當作背景
|
|
|
12 |
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
|
|
|
13 |
#$reuslt["error"],執行不正常結束的錯訊息陣列.
|
|
|
14 |
#$result["function"],當前執行的函式名稱.
|
|
|
15 |
#$result["content"],爲設定背景圖片的css樣式
|
|
|
16 |
#必填的參數:
|
|
|
17 |
$conf["imgPosition"]="img/雪地.jpg";#爲背景圖片的檔案位置,不可省略。
|
|
|
18 |
#可省略的參數:
|
|
|
19 |
$conf["repeatOrNot"]="false";#爲背景圖片是否要並排重複,可省略,預設是重複,若不要重複則給與"false"。
|
|
|
20 |
#$conf["size"]="100%";#爲背景圖片的大小,可省略,預設是"100%"。
|
|
|
21 |
$conf["fixed"]="true";#爲背景在使用者滾動的時候是否要固定不動,可省略,預設是不固定不動,若要固定不動則給與"true"。
|
|
|
22 |
#$conf["rowsPosition"]="";#爲置於橫向的幾%,預設為"50%",可省略。
|
|
|
23 |
#$conf["colsPosition"]="";#爲置於直向的幾%,預設為"-50%",可省略。
|
|
|
24 |
$backgroundImg=css::backgroundImg($conf);
|
|
|
25 |
unset($conf);
|
|
|
26 |
|
|
|
27 |
#如果放置背景圖片失敗
|
|
|
28 |
if($backgroundImg["status"]==="false"){
|
|
|
29 |
|
|
|
30 |
#印出內容
|
|
|
31 |
var_dump($backgroundImg);
|
|
|
32 |
|
|
|
33 |
#結束程式
|
|
|
34 |
exit;
|
|
|
35 |
|
|
|
36 |
}#if end
|
|
|
37 |
|
|
|
38 |
#印出背景圖片
|
|
|
39 |
echo $backgroundImg["content"];
|
|
|
40 |
|
|
|
41 |
#/*
|
|
|
42 |
|
|
|
43 |
#建立隱藏的樣式
|
|
|
44 |
#涵式說明:
|
|
|
45 |
#創建 css 樣式,前面會自動加上「.」.
|
|
|
46 |
#回傳的結果:
|
|
|
47 |
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
|
|
|
48 |
#$result["css"],css設定內容
|
|
|
49 |
#$result["function"],當前執行的函數
|
|
|
50 |
#$result["error"],涵式錯誤訊息,若爲""則表示沒有錯誤
|
|
|
51 |
#$result["styleName"],字串,$conf["cssStyleName"]的值.
|
|
|
52 |
#必填的參數:
|
|
|
53 |
$conf["cssStyleName"]="default";#為該 css 樣式的名稱,不能以數字開頭,限定id的css樣式名稱為「樣式名稱.元素名稱」.
|
|
|
54 |
$conf["attributes"]=array("position","left","top");#為屬性名稱,須為陣列值
|
|
|
55 |
$conf["content"]=array("absolute","0%","0%");#為屬性值,須為陣列值
|
|
|
56 |
$createCssStyle=css::createCssStyle($conf);
|
|
|
57 |
unset($conf);
|
|
|
58 |
|
|
|
59 |
#如果建立樣式失敗
|
|
|
60 |
if($createCssStyle["status"]==="false"){
|
|
|
61 |
|
|
|
62 |
#印出內容
|
|
|
63 |
var_dump($createCssStyle);
|
|
|
64 |
|
|
|
65 |
#結束程式
|
|
|
66 |
exit;
|
|
|
67 |
|
|
|
68 |
}#if end
|
|
|
69 |
|
|
|
70 |
#印出css類別樣式
|
|
|
71 |
echo $createCssStyle["css"];
|
|
|
72 |
|
|
|
73 |
#*/
|
|
|
74 |
|
|
|
75 |
#放置雪寶
|
|
|
76 |
#涵式說明:
|
|
|
77 |
#放置可以套用css樣式的圖片
|
|
|
78 |
#回傳的結果:
|
|
|
79 |
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
|
|
|
80 |
#$result["error"],錯誤訊息陣列
|
|
|
81 |
#$result["function"],當前函數執行的名稱
|
|
|
82 |
#$result["content"],印出圖片的語法。
|
|
|
83 |
#必填的參數:
|
|
|
84 |
$conf["position"]="img/雪寶.png";#圖片位置
|
|
|
85 |
#可省略的參數:
|
|
|
86 |
#$conf["alt"]="";#若沒有圖片要用什麼文字顯示。
|
|
|
87 |
$conf["class"]="hidden";#要套用的css樣式類別名稱。
|
|
|
88 |
$show=img::show($conf);
|
|
|
89 |
unset($conf);
|
|
|
90 |
|
|
|
91 |
#如果放置圖片失敗
|
|
|
92 |
if($show["status"]==="false"){
|
|
|
93 |
|
|
|
94 |
#印出內容
|
|
|
95 |
var_dump($show);
|
|
|
96 |
|
|
|
97 |
#結束程式
|
|
|
98 |
exit;
|
|
|
99 |
|
|
|
100 |
}#if end
|
|
|
101 |
|
|
|
102 |
#印出雪寶
|
|
|
103 |
#echo $show["content"];
|
|
|
104 |
|
|
|
105 |
#聖字的動畫樣式
|
|
|
106 |
#函式說明:
|
|
|
107 |
#製作針對 css class 的動畫.
|
|
|
108 |
#回傳結果:
|
|
|
109 |
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
|
|
|
110 |
#$result["content"],css動畫設定的語法
|
|
|
111 |
#$result["function"],當前執行的函數
|
|
|
112 |
#$result["error"],涵式錯誤訊息陣列
|
|
|
113 |
#$result["warning"],警告訊息陣列
|
|
|
114 |
#必填參數:
|
|
|
115 |
#$conf["name"],字串,css動畫的名稱.
|
|
|
116 |
$conf["name"]="AaT";
|
|
|
117 |
#$conf["durationTime"],字串,整個動畫需要幾秒完成,例如"5s".
|
|
|
118 |
$conf["durationTime"]="10s";
|
|
|
119 |
#$conf["iteration"],字串,整個動畫要重複幾次,"infinite"代表不斷地重複,"0"代表不重複執行.
|
|
|
120 |
$conf["iteration"]="infinite";
|
|
|
121 |
#$conf["direction"],字串,動畫要怎麼樣重複,"alternate"代表來回執行,"normal"代表正常執行.
|
|
|
122 |
$conf["direction"]="normal";
|
|
|
123 |
#$conf["delay"],字串,動畫要延遲幾秒開始,例如"0s".
|
|
|
124 |
$conf["delay"]="0s";
|
|
|
125 |
#$conf["speedMode"],字串,動畫執行過程的速度要用什麼模式來執行,"linear"代表等速,"ease"代表起始跟結尾是靜止的,中間是最快的.
|
|
|
126 |
$conf["speedMode"]="linear";
|
|
|
127 |
#可省略參數:
|
|
|
128 |
#$conf["keyFrameStartPoint"],字串陣列,各個動畫單位開始的時間百分比,"0%"與"from"代表一開始,"100%"與"to"代表時間結束.
|
|
|
129 |
#$conf["keyFrameStartPoint"]=array("0%","20%","40%","60%","80%","100%");
|
|
|
130 |
$conf["keyFrameStartPoint"]=array("0%","50%","100%");
|
|
|
131 |
#$conf["keyFrameCssMoveAttribute"],二維字串陣列,各個動畫影格子的與動畫相關的css屬性.
|
|
|
132 |
$conf["keyFrameCssMoveAttribute"][]=array("transform");
|
|
|
133 |
$conf["keyFrameCssMoveAttribute"][]=array("transform");
|
|
|
134 |
$conf["keyFrameCssMoveAttribute"][]=array("transform");
|
|
|
135 |
#$conf["keyFrameCssMoveAttribute"][]=array("transform");
|
|
|
136 |
#$conf["keyFrameCssMoveAttribute"][]=array("transform");
|
|
|
137 |
#$conf["keyFrameCssMoveAttribute"][]=array("transform");
|
|
|
138 |
#$conf["keyFrameCssMoveValue"],二維字串陣列,各個動畫影格子的與動畫相關的css屬性.
|
|
|
139 |
$conf["keyFrameCssMoveValue"][]=array("translate(35%,100%)");
|
|
|
140 |
$conf["keyFrameCssMoveValue"][]=array("translate(36%,100%)");
|
|
|
141 |
$conf["keyFrameCssMoveValue"][]=array("translate(37%,100%)");
|
|
|
142 |
#$conf["keyFrameCssMoveValue"][]=array("translate(60%)");
|
|
|
143 |
#$conf["keyFrameCssMoveValue"][]=array("translate(80%)");
|
|
|
144 |
#$conf["keyFrameCssMoveValue"][]=array("translate(100%)");
|
|
|
145 |
#$conf["keyFrameCssAttribute"],二維字串陣列,各個動畫影格子的一般非動畫的css屬性.
|
|
|
146 |
$conf["keyFrameCssAttribute"][]=array("opacity","font-size","color");
|
|
|
147 |
$conf["keyFrameCssAttribute"][]=array("opacity","font-size","color");
|
|
|
148 |
$conf["keyFrameCssAttribute"][]=array("opacity","font-size","color");
|
|
|
149 |
#$conf["keyFrameCssAttribute"][]=array("opacity");
|
|
|
150 |
#$conf["keyFrameCssAttribute"][]=array("opacity");
|
|
|
151 |
#$conf["keyFrameCssAttribute"][]=array("opacity");
|
|
|
152 |
#$conf["keyFrameCssValue"],二維字串陣列,各個動畫格子的css屬性數值.
|
|
|
153 |
$conf["keyFrameCssValue"][]=array("0","64px","red");
|
|
|
154 |
$conf["keyFrameCssValue"][]=array("0.5","60px","green");
|
|
|
155 |
$conf["keyFrameCssValue"][]=array("1","64px","blue");
|
|
|
156 |
#$conf["keyFrameCssValue"][]=array("1");
|
|
|
157 |
#$conf["keyFrameCssValue"][]=array("1");
|
|
|
158 |
#$conf["keyFrameCssValue"][]=array("1");
|
|
|
159 |
#參考資料:
|
|
|
160 |
#css動畫,http://blogger.gtwang.org/2013/12/using-css3-animation.html
|
|
|
161 |
#w3c的animation-keyframes,http://www.w3schools.com/cssref/css3_pr_animation-keyframes.asp
|
|
|
162 |
$animation=css::animation($conf);
|
|
|
163 |
unset($conf);
|
|
|
164 |
|
|
|
165 |
#如果建立動畫樣式失敗
|
|
|
166 |
if($animation["status"]==="false"){
|
|
|
167 |
|
|
|
168 |
#印出內容
|
|
|
169 |
var_dump($animation);
|
|
|
170 |
|
|
|
171 |
#結束程式
|
|
|
172 |
exit;
|
|
|
173 |
|
|
|
174 |
}#if end
|
|
|
175 |
|
|
|
176 |
#印出聖字的動畫樣式
|
|
|
177 |
echo $animation["content"];
|
|
|
178 |
|
|
|
179 |
#聖字
|
|
|
180 |
#涵式說明:
|
|
|
181 |
#<div>區塊,裡面可以指定css的class樣式,可以指定提示文字.
|
|
|
182 |
#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.
|
|
|
183 |
#$result["functin"],字串,當前函數的名稱.
|
|
|
184 |
#$result["error"],陣列,錯訊訊息.
|
|
|
185 |
#$result["content"],字串,含有<div>標籤的內容.
|
|
|
186 |
#必填參數:
|
|
|
187 |
#$conf["contentArray"],字串陣列,要放入的內容陣列.
|
|
|
188 |
$conf["contentArray"]=array("聖");
|
|
|
189 |
#可省略參數
|
|
|
190 |
#$conf["id"],字串,div區塊的id.
|
|
|
191 |
#$conf["id"]="";
|
|
|
192 |
#$conf["class"],字串,div區段要套用的css樣式.
|
|
|
193 |
$conf["class"]="default AaT";
|
|
|
194 |
#$conf["title"],陣列,滑鼠移到上面時要顯示的內容,每個元素代表一列內容.
|
|
|
195 |
#$conf["title"]=array();
|
|
|
196 |
#$conf["oneScreenSize"],字串,div區塊是否要占一個螢幕的大小,預設為"false"不設定,"true"為設定成一個螢幕的大小.
|
|
|
197 |
#$conf["oneScreenSize"]="false";
|
|
|
198 |
#$conf["textAlignCenter"],字串,div區塊是否要置中,預設為$conf["oneScreenSize"]的值,"false"為不置中,"true"代表要置中.
|
|
|
199 |
#$conf["textAlignCenter"]="";
|
|
|
200 |
$divSection=css::divSection($conf);
|
|
|
201 |
unset($conf);
|
|
|
202 |
|
|
|
203 |
#如果產生div區塊失敗
|
|
|
204 |
if($divSection["status"]==="false"){
|
|
|
205 |
|
|
|
206 |
#印出內容
|
|
|
207 |
var_dump($animation);
|
|
|
208 |
|
|
|
209 |
#結束程式
|
|
|
210 |
exit;
|
|
|
211 |
|
|
|
212 |
}#if end
|
|
|
213 |
|
|
|
214 |
#印出聖字
|
|
|
215 |
echo $divSection["content"];
|
|
|
216 |
|
|
|
217 |
#聖誕老公公的動畫樣式
|
|
|
218 |
#函式說明:
|
|
|
219 |
#製作針對 css class 的動畫.
|
|
|
220 |
#回傳結果:
|
|
|
221 |
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
|
|
|
222 |
#$result["content"],css動畫設定的語法
|
|
|
223 |
#$result["function"],當前執行的函數
|
|
|
224 |
#$result["error"],涵式錯誤訊息陣列
|
|
|
225 |
#$result["warning"],警告訊息陣列
|
|
|
226 |
#必填參數:
|
|
|
227 |
#$conf["name"],字串,css動畫的名稱.
|
|
|
228 |
$conf["name"]="Aa";
|
|
|
229 |
#$conf["durationTime"],字串,整個動畫需要幾秒完成,例如"5s".
|
|
|
230 |
$conf["durationTime"]="10s";
|
|
|
231 |
#$conf["iteration"],字串,整個動畫要重複幾次,"infinite"代表不斷地重複,"0"代表不重複執行.
|
|
|
232 |
$conf["iteration"]="infinite";
|
|
|
233 |
#$conf["direction"],字串,動畫要怎麼樣重複,"alternate"代表來回執行,"normal"代表正常執行.
|
|
|
234 |
$conf["direction"]="normal";
|
|
|
235 |
#$conf["delay"],字串,動畫要延遲幾秒開始,例如"0s".
|
|
|
236 |
$conf["delay"]="0s";
|
|
|
237 |
#$conf["speedMode"],字串,動畫執行過程的速度要用什麼模式來執行,"linear"代表等速,"ease"代表起始跟結尾是靜止的,中間是最快的.
|
|
|
238 |
$conf["speedMode"]="linear";
|
|
|
239 |
#可省略參數:
|
|
|
240 |
#$conf["keyFrameStartPoint"],字串陣列,各個動畫單位開始的時間百分比,"0%"與"from"代表一開始,"100%"與"to"代表時間結束.
|
|
|
241 |
#$conf["keyFrameStartPoint"]=array("0%","20%","40%","60%","80%","100%");
|
|
|
242 |
$conf["keyFrameStartPoint"]=array("0%","50%","100%");
|
|
|
243 |
#$conf["keyFrameCssMoveAttribute"],二維字串陣列,各個動畫影格子的與動畫相關的css屬性.
|
|
|
244 |
$conf["keyFrameCssMoveAttribute"][]=array("transform");
|
|
|
245 |
$conf["keyFrameCssMoveAttribute"][]=array("transform");
|
|
|
246 |
$conf["keyFrameCssMoveAttribute"][]=array("transform");
|
|
|
247 |
#$conf["keyFrameCssMoveAttribute"][]=array("transform");
|
|
|
248 |
#$conf["keyFrameCssMoveAttribute"][]=array("transform");
|
|
|
249 |
#$conf["keyFrameCssMoveAttribute"][]=array("transform");
|
|
|
250 |
#$conf["keyFrameCssMoveValue"],二維字串陣列,各個動畫影格子的與動畫相關的css屬性.
|
|
|
251 |
$conf["keyFrameCssMoveValue"][]=array("translate(35%,80%)");
|
|
|
252 |
$conf["keyFrameCssMoveValue"][]=array("translate(36%,90%)");
|
|
|
253 |
$conf["keyFrameCssMoveValue"][]=array("translate(37%,100%)");
|
|
|
254 |
#$conf["keyFrameCssMoveValue"][]=array("translate(60%)");
|
|
|
255 |
#$conf["keyFrameCssMoveValue"][]=array("translate(80%)");
|
|
|
256 |
#$conf["keyFrameCssMoveValue"][]=array("translate(100%)");
|
|
|
257 |
#$conf["keyFrameCssAttribute"],二維字串陣列,各個動畫影格子的一般非動畫的css屬性.
|
|
|
258 |
$conf["keyFrameCssAttribute"][]=array("opacity");
|
|
|
259 |
$conf["keyFrameCssAttribute"][]=array("opacity");
|
|
|
260 |
$conf["keyFrameCssAttribute"][]=array("opacity");
|
|
|
261 |
#$conf["keyFrameCssAttribute"][]=array("opacity");
|
|
|
262 |
#$conf["keyFrameCssAttribute"][]=array("opacity");
|
|
|
263 |
#$conf["keyFrameCssAttribute"][]=array("opacity");
|
|
|
264 |
#$conf["keyFrameCssValue"],二維字串陣列,各個動畫格子的css屬性數值.
|
|
|
265 |
$conf["keyFrameCssValue"][]=array("0");
|
|
|
266 |
$conf["keyFrameCssValue"][]=array("0.5");
|
|
|
267 |
$conf["keyFrameCssValue"][]=array("1");
|
|
|
268 |
#$conf["keyFrameCssValue"][]=array("1");
|
|
|
269 |
#$conf["keyFrameCssValue"][]=array("1");
|
|
|
270 |
#$conf["keyFrameCssValue"][]=array("1");
|
|
|
271 |
#參考資料:
|
|
|
272 |
#css動畫,http://blogger.gtwang.org/2013/12/using-css3-animation.html
|
|
|
273 |
#w3c的animation-keyframes,http://www.w3schools.com/cssref/css3_pr_animation-keyframes.asp
|
|
|
274 |
$animation=css::animation($conf);
|
|
|
275 |
unset($conf);
|
|
|
276 |
|
|
|
277 |
#如果建立動畫樣式失敗
|
|
|
278 |
if($animation["status"]==="false"){
|
|
|
279 |
|
|
|
280 |
#印出內容
|
|
|
281 |
var_dump($animation);
|
|
|
282 |
|
|
|
283 |
#結束程式
|
|
|
284 |
exit;
|
|
|
285 |
|
|
|
286 |
}#if end
|
|
|
287 |
|
|
|
288 |
#印出聖誕老公公的動畫樣式
|
|
|
289 |
echo $animation["content"];
|
|
|
290 |
|
|
|
291 |
#放置聖誕老公公
|
|
|
292 |
#涵式說明:
|
|
|
293 |
#放置可以套用css樣式的圖片
|
|
|
294 |
#回傳的結果:
|
|
|
295 |
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
|
|
|
296 |
#$result["error"],錯誤訊息陣列
|
|
|
297 |
#$result["function"],當前函數執行的名稱
|
|
|
298 |
#$result["content"],印出圖片的語法。
|
|
|
299 |
#必填的參數:
|
|
|
300 |
$conf["position"]="img/聖誕老公公.png";#圖片位置
|
|
|
301 |
#可省略的參數:
|
|
|
302 |
#$conf["alt"]="";#若沒有圖片要用什麼文字顯示。
|
|
|
303 |
#$conf["class"]="A";#要套用的css樣式類別名稱。
|
|
|
304 |
$show=img::show($conf);
|
|
|
305 |
unset($conf);
|
|
|
306 |
|
|
|
307 |
#如果放置圖片失敗
|
|
|
308 |
if($show["status"]==="false"){
|
|
|
309 |
|
|
|
310 |
#印出內容
|
|
|
311 |
var_dump($show);
|
|
|
312 |
|
|
|
313 |
#結束程式
|
|
|
314 |
exit;
|
|
|
315 |
|
|
|
316 |
}#if end
|
|
|
317 |
|
|
|
318 |
#放置圖片到div中
|
|
|
319 |
#涵式說明:
|
|
|
320 |
#<div>區塊,裡面可以指定css的class樣式,可以指定提示文字.
|
|
|
321 |
#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.
|
|
|
322 |
#$result["functin"],字串,當前函數的名稱.
|
|
|
323 |
#$result["error"],陣列,錯訊訊息.
|
|
|
324 |
#$result["content"],字串,含有<div>標籤的內容.
|
|
|
325 |
#必填參數:
|
|
|
326 |
#$conf["contentArray"],字串陣列,要放入的內容陣列.
|
|
|
327 |
$conf["contentArray"]=array($show["content"]);
|
|
|
328 |
#可省略參數
|
|
|
329 |
#$conf["id"],字串,div區塊的id.
|
|
|
330 |
#$conf["id"]="";
|
|
|
331 |
#$conf["class"],字串,div區段要套用的css樣式.
|
|
|
332 |
$conf["class"]="Aa default";
|
|
|
333 |
#$conf["title"],陣列,滑鼠移到上面時要顯示的內容,每個元素代表一列內容.
|
|
|
334 |
#$conf["title"]=array();
|
|
|
335 |
#$conf["oneScreenSize"],字串,div區塊是否要占一個螢幕的大小,預設為"false"不設定,"true"為設定成一個螢幕的大小.
|
|
|
336 |
#$conf["oneScreenSize"]="false";
|
|
|
337 |
#$conf["textAlignCenter"],字串,div區塊是否要置中,預設為$conf["oneScreenSize"]的值,"false"為不置中,"true"代表要置中.
|
|
|
338 |
#$conf["textAlignCenter"]="";
|
|
|
339 |
$divSection=css::divSection($conf);
|
|
|
340 |
unset($conf);
|
|
|
341 |
|
|
|
342 |
#如果放置圖片到div失敗
|
|
|
343 |
if($divSection["status"]==="false"){
|
|
|
344 |
|
|
|
345 |
#印出內容
|
|
|
346 |
var_dump($divSection);
|
|
|
347 |
|
|
|
348 |
#結束程式
|
|
|
349 |
exit;
|
|
|
350 |
|
|
|
351 |
}#if end
|
|
|
352 |
|
|
|
353 |
#印出聖誕老公公
|
|
|
354 |
echo divSection["content"];
|
|
|
355 |
|
|
|
356 |
#放置薑餅人
|
|
|
357 |
#涵式說明:
|
|
|
358 |
#放置可以套用css樣式的圖片
|
|
|
359 |
#回傳的結果:
|
|
|
360 |
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
|
|
|
361 |
#$result["error"],錯誤訊息陣列
|
|
|
362 |
#$result["function"],當前函數執行的名稱
|
|
|
363 |
#$result["content"],印出圖片的語法。
|
|
|
364 |
#必填的參數:
|
|
|
365 |
$conf["position"]="img/薑餅人.png";#圖片位置
|
|
|
366 |
#可省略的參數:
|
|
|
367 |
#$conf["alt"]="";#若沒有圖片要用什麼文字顯示。
|
|
|
368 |
$conf["class"]="hidden";#要套用的css樣式類別名稱。
|
|
|
369 |
$show=img::show($conf);
|
|
|
370 |
unset($conf);
|
|
|
371 |
|
|
|
372 |
#如果放置圖片失敗
|
|
|
373 |
if($show["status"]==="false"){
|
|
|
374 |
|
|
|
375 |
#印出內容
|
|
|
376 |
var_dump($show);
|
|
|
377 |
|
|
|
378 |
#結束程式
|
|
|
379 |
exit;
|
|
|
380 |
|
|
|
381 |
}#if end
|
|
|
382 |
|
|
|
383 |
#印出薑餅人
|
|
|
384 |
#echo $show["content"];
|
|
|
385 |
|
|
|
386 |
#放置雪人
|
|
|
387 |
#涵式說明:
|
|
|
388 |
#放置可以套用css樣式的圖片
|
|
|
389 |
#回傳的結果:
|
|
|
390 |
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
|
|
|
391 |
#$result["error"],錯誤訊息陣列
|
|
|
392 |
#$result["function"],當前函數執行的名稱
|
|
|
393 |
#$result["content"],印出圖片的語法。
|
|
|
394 |
#必填的參數:
|
|
|
395 |
$conf["position"]="img/雪人.png";#圖片位置
|
|
|
396 |
#可省略的參數:
|
|
|
397 |
#$conf["alt"]="";#若沒有圖片要用什麼文字顯示。
|
|
|
398 |
$conf["class"]="hidden";#要套用的css樣式類別名稱。
|
|
|
399 |
$show=img::show($conf);
|
|
|
400 |
unset($conf);
|
|
|
401 |
|
|
|
402 |
#如果放置圖片失敗
|
|
|
403 |
if($show["status"]==="false"){
|
|
|
404 |
|
|
|
405 |
#印出內容
|
|
|
406 |
var_dump($show);
|
|
|
407 |
|
|
|
408 |
#結束程式
|
|
|
409 |
exit;
|
|
|
410 |
|
|
|
411 |
}#if end
|
|
|
412 |
|
|
|
413 |
#印出雪人
|
|
|
414 |
#echo $show["content"];
|
|
|
415 |
|
|
|
416 |
?>
|