Re: file_exists($file)

From: Date: Fri, 01 Nov 2002 10:38:09 +0000
Subject: Re: file_exists($file)
References: 1 2 3  Groups: php.general.es 
Request: Send a blank email to general-es+get-28749@lists.php.net to get a copy of this message
Utiliza mejor int fopen ( string filename, string mode [, int use_include_path]) Si string filename empieza por http o ftp los tratará como archivos de red. Sino, como ficheros locales. Devolverá true o false (0 ó 1) según pueda abrir o no el fichero. Marco A. Mateos www.lomejordeinternet.net >>El vie, 01-11-2002 a las 00:38, Gustavo Mársico escribió: > > 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 > > > > > > > > > --------------------------------------------------------------------- > > 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 (#28749) next »