From 086eb06440a187e10158f25a8241e88457f4e7c0 Mon Sep 17 00:00:00 2001 From: Hartmut Holzgraefe Date: Sat, 23 Jun 2001 00:56:33 +0000 Subject: [PATCH] documentation for basename()s optional 2nd argument 'suffix' git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@50019 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/filesystem.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/functions/filesystem.xml b/functions/filesystem.xml index 9807ff36e6..732a62b825 100644 --- a/functions/filesystem.xml +++ b/functions/filesystem.xml @@ -15,11 +15,14 @@ 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 of. On Windows, both slash (/) and backslash @@ -33,6 +36,7 @@ $path = "/home/httpd/html/index.php3"; $file = basename ($path); // $file is set to "index.php3" +$file = basename ($path,".php3"); // $file is set to "index"