note 12010 added to function.basename.php

From: Date: Sun, 18 Mar 2001 08:44:16 +0000
Subject: note 12010 added to function.basename.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-12524@lists.php.net to get a copy of this message
Here's a substitute for basename that works for me in win32: function wbasename($input) { for($i=0; $i < strlen($input); $i++ ) { $pos = strpos($input, '\\', $i); if ($pos != false) $lastpos = $pos; } return substr($input, $lastpos + 1, strlen($input)); } http://www.php.net/manual/en/function.basename.php

« previous php.notes (#12524) next »