Hi,

Friday, July 1, 2005, 9:54:42 AM, you wrote:
GA> if  $_SERVER['SCRIPT_NAME'] give this....
GA> /folder/folder/Library/php/filename.php

GA> what would be the proper way to strip the string until only 'filename'
GA> is left
GA> I'm a bit new at eregi stuff

GA> any help would be appreciated
GA> many thanks

GA> g


I do this:
$file = '/folder/folder/Library/php/filename.php';
$ext = @substr($file, (@strrpos($file, ".") ? @strrpos($file, ".") + 1 : 
@strlen($file)), @strlen($file));
$fname = basename($file,$ext);

-- 
regards,
Tom

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to