Reply to Re: [PHP] Way for script to discover it's path?

Your name:

Reply:


Posted by Ken Tozier on 09/19/05 01:59

Thanks Jordan, that did the trick!

Ken


On Sep 18, 2005, at 6:40 PM, Jordan Miller wrote:

> Hey Ken,
>
> The variable you want is already a superglobal known as $_SERVER
> ['SCRIPT_FILENAME']. See:
> http://www.php.net/reserved.variables
>
> Do something like this to get started:
> echo $_SERVER['SCRIPT_FILENAME'];
>
> Good luck.
>
> Jordan
>
>
>
>
> On Sep 18, 2005, at 4:58 PM, Ken Tozier wrote:
>
>
>> I'm working on an auto-include mechanism for some complex scripts
>> and rather than have all the paths to the various components hard
>> coded, I'd like to have the script walk up the hierarchy looking
>> for it's specified includes. Is it possible to do this? I looked
>> at the various file related php functions but didn't see anything
>> resembling 'my_path()'
>>
>> Thanks
>>
>> Ken
>>
>> --
>> 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
>
>

[Back to original 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

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