Tutorial PHP

PHP INICIO Introducción PHP Instalación de PHP Sintaxis PHP Comentarios PHP Variables PHP PHP Echo / Imprimir Tipos de datos PHP Cadenas PHP Números PHP Matemáticas PHP Constantes PHP Operadores PHP PHP Si... Más... Elseif Cambio de PHP Bucles de PHP Funciones PHP Matrices de PHP Superglobales de PHP PHP expresión regular

Formularios PHP

Manejo de formularios PHP Validación de formulario PHP Formulario PHP requerido Formulario PHP URL/Correo electrónico Formulario PHP completo

PHP Avanzado

Fecha y hora PHP PHP Incluir Manejo de archivos PHP Archivo PHP Abrir/Leer Archivo PHP Crear/Escribir Carga de archivos PHP Cookies PHP Sesiones PHP Filtros PHP Filtros PHP avanzados Funciones de devolución de llamada de PHP PHPJSON Excepciones de PHP

POO de PHP

PHP ¿Qué es la programación orientada a objetos? Clases PHP/Objetos Constructor PHP Destructor PHP Modificadores de acceso de PHP Herencia de PHP Constantes PHP Clases abstractas de PHP Interfaces PHP Características de PHP Métodos estáticos de PHP Propiedades estáticas de PHP Espacios de nombres de PHP Iterables de PHP

Base de datos MySQL

Base de datos MySQL Conexión MySQL MySQL Crear base de datos Crear tabla MySQL MySQL Insertar datos MySQL Obtener la última identificación MySQL Insertar Múltiples MySQL preparado Datos seleccionados de MySQL mysql donde MySQL Ordenar por MySQL Eliminar Datos Datos de actualización de MySQL Límite de datos de MySQL

PHPXML _

Analizadores PHP XML Analizador PHP SimpleXML PHP SimpleXML - Obtener PHP XML Expatriados PHP XML DOM

PHP -AJAX

Introducción a AJAX AJAXPHP Base de datos AJAX XML AJAX Búsqueda en vivo de AJAX Encuesta AJAX

Ejemplos de PHP

Ejemplos de PHP Compilador PHP Cuestionario de PHP Ejercicios PHP Certificado PHP

Referencia PHP

Descripción general de PHP Matriz de PHP Calendario PHP Fecha PHP Directorio PHP Error PHP Excepción PHP Sistema de archivos PHP Filtro PHP PHPFTP PHPJSON Palabras clave PHP PHP Libxml Correo PHP Matemáticas PHP PHP misceláneo PHP MySQLi Red PHP Control de salida de PHP PHP expresión regular PHP SimpleXML flujo PHP Cadena PHP Manejo de variables de PHP Analizador PHP XML código postal de PHP Zonas horarias de PHP

Funciones PHP FTP


PHP FTP Introducción

Las funciones de FTP dan acceso al cliente a los servidores de archivos a través del Protocolo de transferencia de archivos (FTP).

Las funciones de FTP se utilizan para abrir, iniciar sesión y cerrar conexiones, así como cargar, descargar, renombrar, eliminar y obtener información sobre archivos de servidores de archivos. No todas las funciones de FTP funcionarán con todos los servidores ni devolverán los mismos resultados. Las funciones FTP estuvieron disponibles con PHP 3.

Si solo desea leer o escribir en un archivo en un servidor FTP, considere usar el envoltorio ftp:// con las funciones del sistema de archivos que proporcionan una interfaz más simple e intuitiva.


Instalación

Para que estas funciones funcionen, debe compilar PHP con --enable-ftp.

La versión de Windows de PHP tiene soporte incorporado para esta extensión.


Funciones PHP FTP

Function Description
ftp_alloc() Allocates space for a file to be uploaded to the FTP server
ftp_cdup() Changes to the parent directory on the FTP server
ftp_chdir() Changes the current directory on the FTP server
ftp_chmod() Sets permissions on a file via FTP
ftp_close() Closes an FTP connection
ftp_connect() Opens an FTP connection
ftp_delete() Deletes a file on the FTP server
ftp_exec() Executes a command on the FTP server
ftp_fget() Downloads a file from the FTP server and saves it into an open local file
ftp_fput() Uploads from an open file and saves it to a file on the FTP server
ftp_get() Downloads a file from the FTP server
ftp_get_option() Returns runtime options of the FTP connection
ftp_login() Logs in to the FTP connection
ftp_mdtm() Returns the last modified time of a specified file
ftp_mkdir() Creates a new directory on the FTP server
ftp_mlsd() Returns the list of files in the specified directory
ftp_nb_continue() Continues retrieving/sending a file (non-blocking)
ftp_nb_fget() Downloads a file from the FTP server and saves it into an open file (non-blocking)
ftp_nb_fput() Uploads from an open file and saves it to a file on the FTP server (non-blocking)
ftp_nb_get() Downloads a file from the FTP server (non-blocking)
ftp_nb_put() Uploads a file to the FTP server (non-blocking)
ftp_nlist() Returns a list of files in the specified directory on the FTP server
ftp_pasv() Turns passive mode on or off
ftp_put() Uploads a file to the FTP server
ftp_pwd() Returns the current directory name
ftp_quit() Alias of ftp_close()
ftp_raw() Sends a raw command to the FTP server
ftp_rawlist() Returns a list of files with file information from a specified directory
ftp_rename() Renames a file or directory on the FTP server
ftp_rmdir() Deletes an empty directory on the FTP server
ftp_set_option() Sets runtime options for the FTP connection
ftp_site() Sends an FTP SITE command to the FTP server
ftp_size() Returns the size of the specified file
ftp_ssl_connect() Opens a secure SSL-FTP connection
ftp_systype() Returns the system type identifier of the FTP server

Constantes de FTP predefinidas de PHP

Constant Type Description
FTP_ASCII Integer  
FTP_AUTOSEEK Integer  
FTP_AUTORESUME Integer  
FTP_BINARY Integer  
FTP_FAILED Integer Asynchronous transfer has failed
FTP_FINISHED Integer Asynchronous transfer is completed
FTP_IMAGE Integer Alias of FTP_BINARY
FTP_MOREDATA Integer Asynchronous transfer is in progress
FTP_TEXT Integer Alias of FTP_ASCII
FTP_TIMEOUT_SEC Integer The timeout used for network operations
FTP_USEPASVADDRESS Boolean