RE: [PHP] Extracting just the filename from REQUEST_URI
| From: | FvH | Date: | Wed, 28 Mar 2001 17:16:17 +0000 |
| Subject: | RE: [PHP] Extracting just the filename from REQUEST_URI | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-45929@lists.php.net to get a copy of this message | ||
Start parsing the string from the string-length to the begin. so
//training/olddata/file.htm is 27 chars long
Start at 27 and parse it back till you've found the '/' char for the first
time. Read the positionnr. of the / and copy that position+1...strlen and
you're ready.
[FvH]
From: Clayton Dukes [mailto:cdukes@cdukes.com]
Sent: woensdag 28 maart 2001 19:11
To: php-general@lists.php.net
Subject: [PHP] Extracting just the filename from REQUEST_URI
I have a REQUEST_URI that comes in,
REQUEST_URI=//training/olddata/file.htm
How can I extract just the filename? ( $str=file.htm)
Clayton Dukes
---------------------------------------------------------------------
Download Free Essays, Term Papers and Cisco Training from
http://www.gdd.net