mirror of
https://github.com/php/doc-es.git
synced 2026-04-29 10:03:21 +02:00
16726c3641
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@334646 c90b9560-bf6c-de11-be94-00142212c4b1
116 lines
3.4 KiB
XML
116 lines
3.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 8b5940cadeb4f1c8492f4a7f70743a2be807cf39 Maintainer: jesusruiz Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
<refentry xml:id="function.ftp-connect" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>ftp_connect</refname>
|
|
<refpurpose>Abre una conexión FTP</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>resource</type><methodname>ftp_connect</methodname>
|
|
<methodparam><type>string</type><parameter>host</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>port</parameter><initializer>21</initializer></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>timeout</parameter><initializer>90</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>ftp_connect</function> abre una conexión FTP
|
|
al <parameter>host</parameter> especificado.
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>host</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
La dirección del servidor FTP. Este parámetro no debe tener barras al final
|
|
y no debe estar precedido de <literal>ftp://</literal>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>port</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Este parámetro especifica un puerto alternativo al que conectarse. Si es omitido
|
|
o es definido como cero, entonces el puerto FTP predeterminado, 21, será utilizado.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>timeout</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Este parámetro especifica el tiempo de espera para todas las operaciones de red subsiguientes.
|
|
Si se omite, el valor predeterminado es 90 segundos. El tiempo de espera puede ser cambiado y
|
|
consultado en cualquier momento con las funciones <function>ftp_set_option</function> y
|
|
<function>ftp_get_option</function>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Devuelve una secuencia FTP en caso de éxito o &false; en caso de error.
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Ejemplo de <function>ftp_connect</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
$ftp_server = "ftp.example.com";
|
|
|
|
// establecer una conexión o finalizarla
|
|
$conn_id = ftp_connect($ftp_server) or die("No se pudo conectar a $ftp_server");
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>ftp_close</function></member>
|
|
<member><function>ftp_ssl_connect</function></member>
|
|
</simplelist>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- 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:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|