File: ftp.xml

package info (click to toggle)
phpdoc 20020310-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 35,272 kB
  • ctags: 354
  • sloc: xml: 799,767; php: 1,395; cpp: 500; makefile: 200; sh: 140; awk: 51
file content (467 lines) | stat: -rwxr-xr-x 17,711 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
<?xml version="1.0" encoding="iso-8859-1"?>
 <reference id="ref.ftp">
  <title>Funciones FTP</title>
  <titleabbrev>FTP</titleabbrev>

  <partintro>
   <para>
    FTP es el acr&oacute;nimo de File Transfer Protocol (Protocolo de Transferencia
    de Ficheros.</para>

   <para>
    Cuando se utiliza el m&oacute;dulo FTP, se definen las siguientes constantes:

    FTP_ASCII, y
    FTP_BINARY.</para>

  </partintro>

  <refentry id="function.ftp-connect">
   <refnamediv>
    <refname>ftp_connect</refname>
    <refpurpose>Establece una conexi&oacute;n FTP</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Descripci&oacute;n</title>
     <methodsynopsis>
     <type>int</type><methodname>ftp_connect</methodname>
     <methodparam><type>string</type><parameter>host</parameter></methodparam>
     <methodparam choice="opt"><type>int</type><parameter>port
      </parameter></methodparam>
     </methodsynopsis>
    <para>
     Si tiene &eacute;xito, devuelve un flujo FTP. En caso de error,
     devuelve &false;.</para>
    <para>
     <function>ftp_connect</function> establece una conexi&oacute;n FTP al
     <parameter>host</parameter> especificado.  El par&aacute;metro
     <parameter>port</parameter> especifica un puerto alternativo
     al que conectar. Si se omite o es cero, se usa el puerto
     FTP por defecto, 21.</para>
   </refsect1>
  </refentry>


  <refentry id="function.ftp-login">
   <refnamediv>
    <refname>ftp_login</refname>
    <refpurpose>Comienza la sesion en una conexi&oacute;n FTP</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Descripci&oacute;n</title>
     <methodsynopsis>
     <type>int</type><methodname>ftp_login</methodname>
     <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam>
     <methodparam><type>string</type><parameter>username</parameter></methodparam>
     <methodparam><type>string</type><parameter>password</parameter></methodparam>
     </methodsynopsis>
    <para>
     Si tiene &eacute;xito, devuelve &true;. En caso de error, devuelve &false;.</para>
    <para> 
     Inicia una sesion (env&iacute;a identificador de usuario y contrase&ntilde;a)
     en el flujo FTP especificado.</para>
   </refsect1>
  </refentry>

  <refentry id="function.ftp-pwd">
   <refnamediv>
    <refname>ftp_pwd</refname>
    <refpurpose>Devuelve el nombre del directorio actual</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Descripci&oacute;n</title>
     <methodsynopsis>
     <type>int</type><methodname>ftp_pwd</methodname>
     <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam>
     </methodsynopsis>
    <para>
     Devuelve el directorio actual, o &false; en caso de error.</para>
   </refsect1>
  </refentry>

  <refentry id="function.ftp-cdup">
   <refnamediv>
    <refname>ftp_cdup</refname>
    <refpurpose>Cambia al directorio padre</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Descripci&oacute;n</title>
     <methodsynopsis>
     <type>int</type><methodname>ftp_cdup</methodname>
     <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam>
     </methodsynopsis>
    <para>
     Si tiene &eacute;xito, devuelve &true;. En caso de error, devuelve &false;.</para>
    <para> 
     Cambia al directorio padre.</para>
   </refsect1>
  </refentry>

  <refentry id="function.ftp-chdir">
   <refnamediv>
    <refname>ftp_chdir</refname>
    <refpurpose>Cambia de directorio en un servidor FTP</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Descripci&oacute;n</title>
     <methodsynopsis>
     <type>int</type><methodname>ftp_chdir</methodname>
     <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam>
     <methodparam><type>string</type><parameter>directory</parameter></methodparam>
     </methodsynopsis>
    <para>
     Si tiene &eacute;xito, devuelve &true;. En caso de error, devuelve &false;.</para>
    <para> 
     Cambia al directorio especificado por el par&aacute;metro
     <parameter>directory</parameter>.</para>
   </refsect1>
  </refentry>

  <refentry id="function.ftp-mkdir">
   <refnamediv>
    <refname>ftp_mkdir</refname>
    <refpurpose>Crea un directorio</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Descripci&oacute;n</title>
     <methodsynopsis>
     <type>string</type><methodname>ftp_mkdir</methodname>
     <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam>
     <methodparam><type>string</type><parameter>directory</parameter></methodparam>
     </methodsynopsis>
    <para>
     Si tiene &eacute;xito, devuelve el nombre del directorio reci&eacute;n creado.
     En caso de error, devuelve &false;.</para>
    <para> 
     Crea el directorio especificado por el par&aacute;metro
     <parameter>directory</parameter>.</para>
   </refsect1>
  </refentry>

  <refentry id="function.ftp-rmdir">
   <refnamediv>
    <refname>ftp_rmdir</refname>
    <refpurpose>Borra un directorio</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Descripci&oacute;n</title>
     <methodsynopsis>
     <type>int</type><methodname>ftp_rmdir</methodname>
     <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam>
     <methodparam><type>string</type><parameter>directory</parameter></methodparam>
     </methodsynopsis>
    <para>
     Si tiene &eacute;xito, devuelve &true;. En caso de error, devuelve &false;.</para>
    <para> 
     Borra el directorio especificado por el par&aacute;metro
     <parameter>directory</parameter>.</para>
   </refsect1>
  </refentry>

  <refentry id="function.ftp-nlist">
   <refnamediv>
    <refname>ftp_nlist</refname>
    <refpurpose>Devuelve una lista de ficheros del directorio dado.</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Descripci&oacute;n</title>
     <methodsynopsis>
     <type>int</type><methodname>ftp_nlist</methodname>
     <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam>
     <methodparam><type>string</type><parameter>directory</parameter></methodparam>
     </methodsynopsis>
    <para>
     Si tiene &eacute;xito, devuelve un array de nombres de fichero. En caso
     de error, devuelve &false;.</para>
   </refsect1>
  </refentry>

  <refentry id="function.ftp-rawlist">
   <refnamediv>
    <refname>ftp_rawlist</refname>
    <refpurpose>
     Devuelve una lista detallada de ficheros del directorio dado.
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Descripci&oacute;n</title>
     <methodsynopsis>
     <type>int</type><methodname>ftp_rawlist</methodname>
     <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam>
     <methodparam><type>string</type><parameter>directory</parameter></methodparam>
     </methodsynopsis>
    <para>
     <function>ftp_rawlist</function> ejecuta el comando FTP LIST,
     y devuelve el resultado como un array.  Cada elemento del array
     corresponde a una l&iacute;nea de texto.  La salida no se procesa de
     ninguna forma.  Se puede utilizar el identificador de tipo de
     sistema devuelto por <function>ftp_systype</function> para
     determinar c&oacute;mo se deben interpretar los resultados.</para>
   </refsect1>
  </refentry>

  <refentry id="function.ftp-systype">
   <refnamediv>
    <refname>ftp_systype</refname>
    <refpurpose>
     Devuelve el identificador de tipo de sistema del servidor FTP remoto.
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Descripci&oacute;n</title>
     <methodsynopsis>
     <type>int</type><methodname>ftp_systype</methodname>
     <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam>
     </methodsynopsis>
    <para>
     Devuelve el tipo de sistema remoto, o &false; en caso de error.</para>
   </refsect1>
  </refentry>

  <refentry id="function.ftp-pasv">
   <refnamediv>
    <refname>ftp_pasv</refname>
    <refpurpose>Activa o desactiva el modo pasivo.</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Descripci&oacute;n</title>
     <methodsynopsis>
     <type>int</type><methodname>ftp_pasv</methodname>
     <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam>
     <methodparam><type>int</type><parameter>pasv</parameter></methodparam>
     </methodsynopsis>
    <para>
     Si tiene &eacute;xito, devuelve &true;. En caso de error, devuelve &false;.</para>
    <para>
     <function>ftp_pasv</function> activa el modo pasivo si el
     par&aacute;metro <parameter>pasv</parameter> es &true; (desactiva
     el modo pasivo si <parameter>pasv</parameter> es &false;.)  En
     modo pasivo, las conexiones de datos son iniciadas por el cliente,
     en lugar de ser iniciadas por el servidor.</para>
   </refsect1>
  </refentry>

  <refentry id="function.ftp-get">
   <refnamediv>
    <refname>ftp_get</refname>
    <refpurpose>Descarga un fichero del servidor FTP.</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Descripci&oacute;n</title>
     <methodsynopsis>
     <type>int</type><methodname>ftp_get</methodname>
     <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam>
     <methodparam><type>string</type><parameter>local_file</parameter></methodparam>
     <methodparam><type>string</type><parameter>remote_file</parameter></methodparam>
     <methodparam><type>int</type><parameter>mode</parameter></methodparam>
     </methodsynopsis>
    <para>
     Si tiene &eacute;xito, devuelve &true;. En caso de error, devuelve &false;.</para>
    <para>
     <function>ftp_get</function> baja el fichero
     <parameter>remote_file</parameter> del servidor FTP, y lo guarda
     localmente como <parameter>local_file</parameter>.  El modo de
     transferencia especificado por el par&aacute;metro <parameter>mode</parameter>
     debe ser FTP_ASCII o bien FTP_BINARY.</para>
   </refsect1>
  </refentry>

  <refentry id="function.ftp-fget">
   <refnamediv>
    <refname>ftp_fget</refname>
    <refpurpose>Descarga un fichero del servidor FTP y lo guarda en
     un fichero abierto.</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Descripci&oacute;n</title>
     <methodsynopsis>
     <type>int</type><methodname>ftp_fget</methodname>
     <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam>
     <methodparam><type>int</type><parameter>fp</parameter></methodparam>
     <methodparam><type>string</type><parameter>remote_file</parameter></methodparam>
     <methodparam><type>int</type><parameter>mode</parameter></methodparam>
     </methodsynopsis>
    <para>
     Si tiene &eacute;xito, devuelve &true;. En caso de error, devuelve &false;.</para>
    <para>
     <function>ftp_fget</function> baja el fichero
     <parameter>remote_file</parameter> del servidor FTP, y lo escribe en
     el puntero a fichero <parameter>fp</parameter>.  El modo de
     transferencia especificado por el par&aacute;metro <parameter>mode</parameter>
     debe ser FTP_ASCII o bien FTP_BINARY.</para>
   </refsect1>
  </refentry>

  <refentry id="function.ftp-put">
   <refnamediv>
    <refname>ftp_put</refname>
    <refpurpose>Sube un fichero al servidor FTP.</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Descripci&oacute;n</title>
     <methodsynopsis>
     <type>int</type><methodname>ftp_put</methodname>
     <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam>
     <methodparam><type>string</type><parameter>remote_file</parameter></methodparam>
     <methodparam><type>string</type><parameter>local_file</parameter></methodparam>
     <methodparam><type>int</type><parameter>mode</parameter></methodparam>
     </methodsynopsis>
    <para>
     Si tiene &eacute;xito, devuelve &true;. En caso de error, devuelve &false;.</para>
    <para>
     <function>ftp_put</function> sube el fichero local
     <parameter>local_file</parameter> al servidor FTP y lo guarda como
     <parameter>remote_file</parameter>.  El modo de transferencia
     especificado por el par&aacute;metro <parameter>mode</parameter>
     debe ser FTP_ASCII o bien FTP_BINARY.</para>
   </refsect1>
  </refentry>

  <refentry id="function.ftp-fput">
   <refnamediv>
    <refname>ftp_fput</refname>
    <refpurpose>Sube un fichero abierto al servidor FTP.</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Descripci&oacute;n</title>
     <methodsynopsis>
     <type>int</type><methodname>ftp_fput</methodname>
     <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam>
     <methodparam><type>string</type><parameter>remote_file</parameter></methodparam>
     <methodparam><type>int</type><parameter>fp</parameter></methodparam>
     <methodparam><type>int</type><parameter>mode</parameter></methodparam>
     </methodsynopsis>
    <para>
     Si tiene &eacute;xito, devuelve &true;. En caso de error, devuelve &false;</para>
    <para>
     <function>ftp_fput</function> sube los datos apuntados por el puntero a
     fichero <parameter>fp</parameter> hasta alcanzar el final del fichero.  Los
     resultados se guardan en el fichero <parameter>remote_file</parameter>
     del FTP remoto.  El modo de transferencia especificado por el par&aacute;metro
     <parameter>mode</parameter> debe ser FTP_ASCII o bien FTP_BINARY.</para>
   </refsect1>
  </refentry>

  <refentry id="function.ftp-size">
   <refnamediv>
    <refname>ftp_size</refname>
    <refpurpose>Devuelve el tama&ntilde;o del fichero especificado.</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Descripci&oacute;n</title>
     <methodsynopsis>
     <type>int</type><methodname>ftp_size</methodname>
     <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam>
     <methodparam><type>string</type><parameter>remote_file</parameter></methodparam>
     </methodsynopsis>
    <para>
     Si tiene &eacute;xito devuelve el tama&ntilde;o del fichero, o -1 en caso de error.</para>
    <para>
     <function>ftp_size</function> devuelve el tama&ntilde;o de un fichero.  Si
     ocurre alg&uacute;n error, o si el fichero no existe, devuelve -1.  No
     todos los servidores soportan esta caracter&iacute;stica.</para>
   </refsect1>
  </refentry>

  <refentry id="function.ftp-mdtm">
   <refnamediv>
    <refname>ftp_mdtm</refname>
    <refpurpose>Devuelve la fecha de &uacute;ltima modificaci&oacute;n del fichero
     especificado.</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Descripci&oacute;n</title>
     <methodsynopsis>
     <type>int</type><methodname>ftp_mdtm</methodname>
     <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam>
     <methodparam><type>string</type><parameter>remote_file</parameter></methodparam>
     </methodsynopsis>
    <para>
     Si tiene &eacute;xito, devuelve una marca de tiempo UNIX (UNIX timestamp).
     En caso de error, devuelve -1.</para>
    <para>
     <function>ftp_mdtm</function> comprueba la fecha de &uacute;ltima modificaci&oacute;n
     de un fichero, y la devuelve como una marca de tiempo UNIX.  Si se
     produce alg&uacute;n error, o el fichero no existe, devuelve -1.  Tenga en
     cuenta que no todos los servidores soportan esta caracter&iacute;stica.</para>
   </refsect1>
  </refentry>

  <refentry id="function.ftp-rename">
   <refnamediv>
    <refname>ftp_rename</refname>
    <refpurpose>Renombra un fichero del servidor FTP.</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Descripci&oacute;n</title>
     <methodsynopsis>
     <type>int</type><methodname>ftp_rename</methodname>
     <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam>
     <methodparam><type>string</type><parameter>from</parameter></methodparam>
     <methodparam><type>string</type><parameter>to</parameter></methodparam>
     </methodsynopsis>
    <para>
     Si tiene &eacute;xito, devuelve &true;. En caso de error, devuelve &false;.</para>
    <para>
     <function>ftp_rename</function> renombra el fichero especificado por
     el par&aacute;metro <parameter>from</parameter> con el nuevo nombre
     <parameter>to</parameter></para>
   </refsect1>
  </refentry>

  <refentry id="function.ftp-delete">
   <refnamediv>
    <refname>ftp_delete</refname>
    <refpurpose>Borra un fichero del servidor FTP.</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Descripci&oacute;n</title>
     <methodsynopsis>
     <type>int</type><methodname>ftp_delete</methodname>
     <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam>
     <methodparam><type>string</type><parameter>path</parameter></methodparam>
     </methodsynopsis>
    <para>
     Si tiene &eacute;xito, devuelve &true;. En caso de error, devuelve &false;.</para>
    <para>
     <function>ftp_delete</function> borra el fichero especificado por el
     par&aacute;metro <parameter>path</parameter> del servidor FTP.</para>
   </refsect1>
  </refentry>

  <refentry id="function.ftp-quit">
   <refnamediv>
    <refname>ftp_quit</refname>
    <refpurpose>Cierra una conexi&oacute;n FTP</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Descripci&oacute;n</title>
     <methodsynopsis>
     <type>int</type><methodname>ftp_quit</methodname>
     <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam>
     </methodsynopsis>
    <para>
     <function>ftp_connect</function> cierra el flujo FTP
     <parameter>ftp_stream</parameter>.</para>
   </refsect1>
  </refentry>

</reference>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->