★ wanayoo — archive 1999 http://www.php.net/manual/fr/function.basename.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to Système de fichiers
Quick Reference
English version of this pageGerman version of this pageJapanese version of this pageItalian version of this pageHungarian version of this page
Système de fichiers
* basename
* chgrp
* chmod
* chown
* clearstatcache
* copy
* delete
* dirname
* diskfreespace
* fclose
* feof
* fgetc
* fgetcsv
* fgets
* fgetss
* file
* file_exists
* fileatime
* filectime
* filegroup
* fileinode
* filemtime
* fileowner
* fileperms
* filesize
* filetype
* flock
* fopen
* fpassthru
* fputs
* fread
* fseek
* ftell
* fwrite
* set_file_buffer
* is_dir
* is_executable
* is_file
* is_link
* is_readable
* is_writeable
* link
* linkinfo
* mkdir
* pclose
* popen
* readfile
* readlink
* rename
* rewind
* rmdir
* stat
* lstat
* symlink
* tempnam
* touch
* umask
* unlink
Manual: basename
View the source code for this pageSearch the site



Previous page
 Système de fichiers
 Updated
Sun, 06 Aug 2000
chgrp 
Next page


basename

(PHP3 , PHP4 )

basename --  Sépare le nom du fichier et le nom du dossier.

Description

string basename (string path)

Cette fonction prend en paramètre le chemin complet d'un fichier et en extrait le nom du fichier.

Sous Windows, les caractères (/) et backslash (\) sont utilisés comme séparateur de dossier. Sous les autres OS, seul le caractère slash (/) est utilisé.

Exemple 1. Exemple avec basename()


$path = "/home/httpd/html/index.php3";
$file = basename($path); // $file est affecté avec "index.php3"
      

Voir aussi: dirname().


User Contributed Notes: basename


chopin@csone.kaist.ac.kr
10-Sep-1999 02:48
tailing directory char '/' is ignored in dirname() and basename()
<PRE>
dirname("http://host.net/dir/dir2/") = "http://host.net/dir"
basename("http://host.net/dir/dir2/") = "dir2"
</PRE>



 About Notes


Previous page
 Système de fichiers
 Updated
Sun, 06 Aug 2000
chgrp 
Next page





Who's responsible for this?
Top of this page

Site
Hosting:



Located in
United States
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.