Re: [PHP] get name of file

2001-03-19 Thread Data Driven Design
- Original Message - From: Matthew Delmarter <[EMAIL PROTECTED]> To: PHP Mailing List <[EMAIL PROTECTED]> Sent: Monday, March 19, 2001 6:51 PM Subject: [PHP] get name of file > How do I return the name of a file without any extensions or path info. > > Eg how do I return "about" from

RE: [PHP] get name of file

2001-03-19 Thread Thor M. Steindorsson
> How do I return the name of a file without any extensions or path info. > Eg how do I return "about" from "http://www.domainz.com/about.htm". Here's a quick and dirty way: http://www.domainz.com/about.htm"; $url = explode("/",$url); $num = count($url); $name = explode(".",$url[($num-1)]); $doc

Re: [PHP] get name of file

2001-03-19 Thread John LYC
$PHP_SELF returns the file name.. go to php website manual and serach for it.. john Matthew Delmarter wrote: > How do I return the name of a file without any extensions or path info. > > Eg how do I return "about" from "http://www.domainz.com/about.htm". > > Regards, > > Matthew Delmarter > > -

RE: [PHP] get name of file

2001-03-19 Thread Jack Dempsey
matthew, that'd be a complex regexp...there are lots of books and tutorials on them...definitely worth learning... search google for regular expression tutorial...you'll find tons of hits, like this: http://gosling.miass.chel.su/books/Perl/3/RegExp_Tutorial.html -jack -Original Message-