RE: [PHP] path

From: Date: Fri, 10 Nov 2006 18:54:50 +0000
Subject: RE: [PHP] path
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-244479@lists.php.net to get a copy of this message
> -----Original Message----- > From: Alain Roger [mailto:raf.news@gmail.com] > Sent: Friday, November 10, 2006 1:48 PM > To: PHP General List > Subject: [PHP] path > > Hi, > > How can i get the path in which a PHP file is running ? > > for example, user clicking on a link opened page "action.php" file. > this php file is located as "C:\webserver\mywebsite\php\test\action.php" > > how can i get this path (C:\webserver\mywebsite\php\test\)? > > thx. > Al. You should be able to do some string functions on $_SERVER["SCRIPT_FILENAME"] to get it. -B

« previous php.general (#244479) next »