Re: file_exists($file)

From: Date: Thu, 31 Oct 2002 23:38:41 +0000
Subject: Re: file_exists($file)
References: 1  Groups: php.general.es 
Request: Send a blank email to general-es+get-28741@lists.php.net to get a copy of this message
Gabriel: Según la documentación en php, la función file_exists no funciona sobre archivos remotos: file_exists (PHP 3, PHP 4 ) file_exists -- Checks whether a file exists Description bool file_exists ( string filename) Returns TRUE if the file specified by filename exists; FALSE otherwise. This function will not work on remote files; the file to be examined must be accessible via the server's filesystem. Podrías usar fopen (http://www.php.net/manual/en/function.fopen.php). Slds, Gustavo ----- Original Message ----- From: "Gabriel Snyrynskyj" <sgabriel@descansonatural.com> To: <lista@phpes.com> Sent: Thursday, October 31, 2002 5:14 PM Subject: [PHP-ES] file_exists($file) > Muchachos. Tengo un problema con el sig. Código. > Tengo un archivo: > $file=http://www.php.net/gifs/php_logo.gif; > y quiero saber si realmente existe ese fichero. Entonces > > if (file_exists($file)){ > echo "El fichero existe"; > }else{ > echo "El fichero no existe"; > } > > El problema surge que el fichero si existe pero siempre me dice que no es > así. Estamos todos locos? > > Un saludo > Gabriel > > > --------------------------------------------------------------------- > Archivo On-line: http://www.phpes.com/ > via news: news://news.phpes.com/ > Manual PHP en español: http://www.php.net/manual/es/ > Para dar de baja la suscripción, mande un mensaje a: > lista-unsubscribe@phpes.com >

« previous php.general.es (#28741) next »