RE: [PHP] Getting just the filename

2002-03-28 Thread Rick Emery

string basename (string path [, string suffix])

i recommend you read the manual before posting

-Original Message-
From: Sharat Hegde [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 1:49 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Getting just the filename


Hello,

Is there a simple way of getting just the filename from strings which give 
the filename along with the path.

For example, I need test.txt from c:\myfiles\test.txt
It should also work with the / character, in other words, give test.txt 
from /htdocs/myfiles/test.txt

With Regards,
Sharat



_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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

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




RE: [PHP] Getting just the filename

2002-03-28 Thread Vail, Warren

One of the things I like about PHP, is if you think of something that you
need like this, someone else has already thought about it and provided a
function to do it.  Try;

http://www.php.net/manual/en/function.pathinfo.php


Warren Vail
Tools, Metrics  Quality Processes
(415) 667-7814
Pager (877) 774-9891
215 Fremont 02-658


-Original Message-
From: Sharat Hegde [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 11:49 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Getting just the filename


Hello,

Is there a simple way of getting just the filename from strings which give 
the filename along with the path.

For example, I need test.txt from c:\myfiles\test.txt
It should also work with the / character, in other words, give test.txt 
from /htdocs/myfiles/test.txt

With Regards,
Sharat



_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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

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