source: www/manuals/PHP_manual/ref.wddx.html@ 1

Last change on this file since 1 was 1, checked in by george, 17 years ago

Prvotní import všeho

File size: 5.5 KB
Line 
1<HTML
2><HEAD
3><TITLE
4>WDDX funkce</TITLE
5><META
6NAME="GENERATOR"
7CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
8REL="HOME"
9TITLE="Manuál PHP"
10HREF="index.html"><LINK
11REL="UP"
12TITLE="Reference funkcí"
13HREF="funcref.html"><LINK
14REL="PREVIOUS"
15TITLE="w32api_set_call_method"
16HREF="function.w32api-set-call-method.html"><LINK
17REL="NEXT"
18TITLE="wddx_add_vars"
19HREF="function.wddx-add-vars.html"><META
20HTTP-EQUIV="Content-type"
21CONTENT="text/html; charset=ISO-8859-2"></HEAD
22><BODY
23CLASS="reference"
24BGCOLOR="#FFFFFF"
25TEXT="#000000"
26LINK="#0000FF"
27VLINK="#840084"
28ALINK="#0000FF"
29><DIV
30CLASS="NAVHEADER"
31><TABLE
32SUMMARY="Header navigation table"
33WIDTH="100%"
34BORDER="0"
35CELLPADDING="0"
36CELLSPACING="0"
37><TR
38><TH
39COLSPAN="3"
40ALIGN="center"
41>Manuál PHP</TH
42></TR
43><TR
44><TD
45WIDTH="10%"
46ALIGN="left"
47VALIGN="bottom"
48><A
49HREF="function.w32api-set-call-method.html"
50ACCESSKEY="P"
51>Pøedcházející</A
52></TD
53><TD
54WIDTH="80%"
55ALIGN="center"
56VALIGN="bottom"
57></TD
58><TD
59WIDTH="10%"
60ALIGN="right"
61VALIGN="bottom"
62><A
63HREF="function.wddx-add-vars.html"
64ACCESSKEY="N"
65>Dal¹í</A
66></TD
67></TR
68></TABLE
69><HR
70ALIGN="LEFT"
71WIDTH="100%"></DIV
72><DIV
73CLASS="reference"
74><A
75NAME="ref.wddx"
76></A
77><DIV
78CLASS="TITLEPAGE"
79><H1
80CLASS="title"
81>CV. WDDX funkce</H1
82><DIV
83CLASS="PARTINTRO"
84><A
85NAME="AEN87132"
86></A
87><P
88>&#13; Tyto funkce jsou urèeny pro práci s <A
89HREF="http://www.openwddx.org/"
90TARGET="_top"
91>WDDX</A
92>.
93 </P
94><P
95>&#13; Pokud chcete pou¾ívat WDDX, budete muset nainstalovat expat knihovnu
96 (která je u Apache 1.3.7 a vy¹¹ích) a zkompilovat PHP s
97 <TT
98CLASS="option"
99>--with-xml</TT
100> a
101 <TT
102CLASS="option"
103>--enable-wddx</TT
104>.
105 </P
106><P
107>&#13; Pozn.: v¹echny funkce které serializují promìnné pou¾ívají první element
108 pole k rozhodnutí jestli se toto pole serializuje do pole nebo struktury.
109 Pokud má první element øetìzec jako index, serializuje se do struktury,
110 jinak do pole.
111
112 <TABLE
113WIDTH="100%"
114BORDER="0"
115CELLPADDING="0"
116CELLSPACING="0"
117CLASS="EXAMPLE"
118><TR
119><TD
120><DIV
121CLASS="example"
122><A
123NAME="AEN87139"
124></A
125><P
126><B
127>Pøíklad 1. Serializace jediné hodnoty</B
128></P
129><TABLE
130BORDER="0"
131BGCOLOR="#E0E0E0"
132CELLPADDING="5"
133><TR
134><TD
135><PRE
136CLASS="php"
137>&#60;?php
138print wddx_serialize_value("PHP to WDDX packet example", "PHP packet");
139?&#62;</PRE
140></TD
141></TR
142></TABLE
143></DIV
144></TD
145></TR
146></TABLE
147></P
148><P
149>&#13; Tato ukázka vytvoøí:
150 <DIV
151CLASS="informalexample"
152><A
153NAME="AEN87143"
154></A
155><P
156></P
157><TABLE
158BORDER="0"
159BGCOLOR="#E0E0E0"
160CELLPADDING="5"
161><TR
162><TD
163><PRE
164CLASS="php"
165>&#60;wddxPacket version='1.0'&#62;&#60;header comment='PHP packet'/&#62;&#60;data&#62;
166&#60;string&#62;PHP to WDDX packet example&#60;/string&#62;&#60;/data&#62;&#60;/wddxPacket&#62;</PRE
167></TD
168></TR
169></TABLE
170><P
171></P
172></DIV
173>
174
175 <TABLE
176WIDTH="100%"
177BORDER="0"
178CELLPADDING="0"
179CELLSPACING="0"
180CLASS="EXAMPLE"
181><TR
182><TD
183><DIV
184CLASS="example"
185><A
186NAME="AEN87145"
187></A
188><P
189><B
190>Pøíklad 2. Pou¾ití inkrementálních paketù</B
191></P
192><TABLE
193BORDER="0"
194BGCOLOR="#E0E0E0"
195CELLPADDING="5"
196><TR
197><TD
198><PRE
199CLASS="php"
200>&#60;?php
201$pi = 3.1415926;
202$packet_id = wddx_packet_start("PHP");
203wddx_add_vars($packet_id, "pi");
204
205/* Suppose $cities came from database */
206$cities = array("Austin", "Novato", "Seattle");
207wddx_add_vars($packet_id, "cities");
208
209$packet = wddx_packet_end($packet_id);
210print $packet;
211?&#62;</PRE
212></TD
213></TR
214></TABLE
215></DIV
216></TD
217></TR
218></TABLE
219></P
220><P
221>&#13; Tato ukázka vytvoøí:
222
223 <DIV
224CLASS="informalexample"
225><A
226NAME="AEN87149"
227></A
228><P
229></P
230><TABLE
231BORDER="0"
232BGCOLOR="#E0E0E0"
233CELLPADDING="5"
234><TR
235><TD
236><PRE
237CLASS="php"
238>&#60;wddxPacket version='1.0'&#62;&#60;header comment='PHP'/&#62;&#60;data&#62;&#60;struct&#62;
239&#60;var name='pi'&#62;&#60;number&#62;3.1415926&#60;/number&#62;&#60;/var&#62;&#60;var name='cities'&#62;
240&#60;array length='3'&#62;&#60;string&#62;Austin&#60;/string&#62;&#60;string&#62;Novato&#60;/string&#62;
241&#60;string&#62;Seattle&#60;/string&#62;&#60;/array&#62;&#60;/var&#62;&#60;/struct&#62;&#60;/data&#62;&#60;/wddxPacket&#62;</PRE
242></TD
243></TR
244></TABLE
245><P
246></P
247></DIV
248></P
249></DIV
250><DIV
251CLASS="TOC"
252><DL
253><DT
254><B
255>Obsah</B
256></DT
257><DT
258><A
259HREF="function.wddx-add-vars.html"
260>wddx_add_vars</A
261>&nbsp;--&nbsp;Pøidat promìnné do WDDX paketu s urèeným ID</DT
262><DT
263><A
264HREF="function.wddx-deserialize.html"
265>wddx_deserialize</A
266>&nbsp;--&nbsp;Deserializovat WDDX paket</DT
267><DT
268><A
269HREF="function.wddx-packet-end.html"
270>wddx_packet_end</A
271>&nbsp;--&nbsp;Ukonèit WDDX paket se zadaným ID</DT
272><DT
273><A
274HREF="function.wddx-packet-start.html"
275>wddx_packet_start</A
276>&nbsp;--&nbsp;Zaèít nový WDDX paket obsahující strukturu</DT
277><DT
278><A
279HREF="function.wddx-serialize-value.html"
280>wddx_serialize_value</A
281>&nbsp;--&nbsp;Serializovat jedinou hodnotu do WDDX paketu</DT
282><DT
283><A
284HREF="function.wddx-serialize-vars.html"
285>wddx_serialize_vars</A
286>&nbsp;--&nbsp;Serializovat promìnné do WDDX paketu</DT
287></DL
288></DIV
289></DIV
290></DIV
291><DIV
292CLASS="NAVFOOTER"
293><HR
294ALIGN="LEFT"
295WIDTH="100%"><TABLE
296SUMMARY="Footer navigation table"
297WIDTH="100%"
298BORDER="0"
299CELLPADDING="0"
300CELLSPACING="0"
301><TR
302><TD
303WIDTH="33%"
304ALIGN="left"
305VALIGN="top"
306><A
307HREF="function.w32api-set-call-method.html"
308ACCESSKEY="P"
309>Pøedcházející</A
310></TD
311><TD
312WIDTH="34%"
313ALIGN="center"
314VALIGN="top"
315><A
316HREF="index.html"
317ACCESSKEY="H"
318>Domù</A
319></TD
320><TD
321WIDTH="33%"
322ALIGN="right"
323VALIGN="top"
324><A
325HREF="function.wddx-add-vars.html"
326ACCESSKEY="N"
327>Dal¹í</A
328></TD
329></TR
330><TR
331><TD
332WIDTH="33%"
333ALIGN="left"
334VALIGN="top"
335>w32api_set_call_method</TD
336><TD
337WIDTH="34%"
338ALIGN="center"
339VALIGN="top"
340><A
341HREF="funcref.html"
342ACCESSKEY="U"
343>Nahoru</A
344></TD
345><TD
346WIDTH="33%"
347ALIGN="right"
348VALIGN="top"
349>wddx_add_vars</TD
350></TR
351></TABLE
352></DIV
353></BODY
354></HTML
355>
Note: See TracBrowser for help on using the repository browser.