From 45d2383a2fcfbaf4d5b9da7fdca5570d284e1f68 Mon Sep 17 00:00:00 2001 From: Philip Olson Date: Thu, 27 Sep 2001 09:28:05 +0000 Subject: [PATCH] Putting new basename() parameter info in typical format. Changing basename() example from .php3 to .php as well. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@58575 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/filesystem.xml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/functions/filesystem.xml b/functions/filesystem.xml index 9403d4b83d..2c6e8a2def 100644 --- a/functions/filesystem.xml +++ b/functions/filesystem.xml @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -24,8 +24,7 @@ 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 (the suffix parameter was added - in PHP 4.0.7). + also be cut off. On Windows, both slash (/) and backslash @@ -37,12 +36,17 @@ <function>basename</function> example -$path = "/home/httpd/html/index.php3"; -$file = basename ($path); // $file is set to "index.php3" -$file = basename ($path,".php3"); // $file is set to "index" +$path = "/home/httpd/html/index.php"; +$file = basename ($path); // $file is set to "index.php" +$file = basename ($path,".php"); // $file is set to "index" + + + The suffix parameter was added in PHP 4.0.7. + + See also: dirname