Reply to Get Current Script File Name

Your name:

Reply:


Posted by thehuby on 04/27/06 01:45

How do you get the name of the currently execting script?

By this I mean the name of the include file that is being executed:

File: include.php
<?php
//Call some function to display include.php or whatever my filename is
?>

File: holder.php
<?php
inlcude( "include.php" );
?>

I tried everything in the $_SERVER variable but to no avail - Googling
it doesn't help as it all points to either the include method or the
$_SERVER variable. These all just give me 'holder.php' or similar.

I want this as I want to create a LOGGER class similar to the one in
Java to catch errors and keep them logged in a file I can download from
time to time.

[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

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