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