You are here: Re: [PHP] getting a filename [with no extension] out of a url « PHP « IT news, forums, messages
Re: [PHP] getting a filename [with no extension] out of a url

Posted by Richard Davey on 07/01/05 04:29

Hello Graham,

Friday, July 1, 2005, 12:54:42 AM, you wrote:

GA> if $_SERVER['SCRIPT_NAME'] give this....
GA> /folder/folder/Library/php/filename.php

$_SERVER['SCRIPT_NAME'] won't give you that,
$_SERVER['SCRIPT_FILENAME'] would.

SCRIPT_NAME would just give you /filename.php

And if you need to remove the slash at the start, pick any of the
following: substr, str_replace, preg_replace, strpos, etc.

Best regards,

Richard Davey
--
http://www.launchcode.co.uk - PHP Development Services
"I do not fear computers. I fear the lack of them." - Isaac Asimov

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация