Forum Moderators: coopster

Message Too Old, No Replies

Function returns fullpatch to file?

         

jastu

8:03 pm on Aug 25, 2007 (gmt 0)

10+ Year Member



Hello,
how can i get full path to file in php?
for exmaple :

[php]

$path = function_name('index.php');

// C:/www/test/index.php
echo $path;

[/php]

Thanks!

jatar_k

8:18 pm on Aug 25, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



take a look through the $_SERVER [php.net] variables

jastu

8:44 pm on Aug 25, 2007 (gmt 0)

10+ Year Member



Thank's, but it's a solution for file which name is in adress (now executing). I need this function to lokalize any file (for file map creator)

Little_G

9:40 pm on Aug 25, 2007 (gmt 0)

10+ Year Member



Hi,

Try, realpath [php.net]

Andrew