You are here: Re: getting the name of the PHP file « PHP Programming Language « IT news, forums, messages
Re: getting the name of the PHP file

Posted by Phil on 09/10/06 10:09

Tuomas wrote, On 10/09/06 9.09 p:
> Hi! I am a PHP beginner, and I don't know my way around. Let's say I
> have a file named as "file.php". Is there a special variable that
> already includes the file name, or should I just manually code it into
> the script; i.e. $filename = "file.php"? I am writing a script that
> prints out some information about each HTML/PHP file in my home
> directory. The name of the file is among them.

You want the magic constant __FILE__, take a read of
<http://nz.php.net/manual/en/language.constants.predefined.php> for more
information on them.

-Phil

 

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

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