Reply to Re: Calling PHP file

Your name:

Reply:


Posted by Alan Jones on 05/14/07 23:36

On Tue, 15 May 2007 07:20:47 +1000, David Cain <david@shesurf.ws>
wrote:

>I am just wondering if there is a PHP function that returns the file
>name or domain name of where the file/script is located that called the
>PHP script in question?
>
>Thanks in advance.

$_SERVER used with one of several reserved variables will do that.
I like... $_SERVER['PHP_SELF']

Here's how you might use it...

<?php if ($_SERVER['PHP_SELF'] == '/index.php')
{include('signature.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

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