Re: Bajar ficheros del Servidor
| From: | Raül Basanta Bayo | Date: | Tue, 01 Apr 2003 12:05:45 +0000 |
| Subject: | Re: Bajar ficheros del Servidor | ||
| References: | 1 2 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-34504@lists.php.net to get a copy of this message | ||
Hola:
-string basename ( string path [, string suffix])
Given a string containing a path to a file, this function will return
the base name of the file. If the filename ends in suffix this will also be
cut off.
On Windows, both slash (/) and backslash (\) are used as path separator
character. In other environments, it is the forward slash (/).
Example 1. basename() example
$path = "/home/httpd/html/index.php";
$file = basename ($path); // $file is set to "index.php"
$file = basename ($path,".php"); // $file is set to "index"
See also: dirname() <-- COÑO!... veamos....
string dirname ( string path)
Given a string containing a path to a file, this function will return the
name of the directory.
On Windows, both slash (/) and backslash (\) are used as path separator
character. In other environments, it is the forward slash (/).
Example 1. dirname() example
$path = "/etc/passwd";
$file = dirname ($path); // $file is set to "/etc"
Easy? ... naaaa... ;) (mira más el manual)
----- Original Message -----
Estoy mirando por qué, pero me podrías decir como puede decirle un path
concreto, dónde leer el fichero?. Con el basename() lo único que consigo es
quedarme con el nombre del fichero, elimina los directorios, pero si yo..