Page 1 of 1

where to find absolute path?

Posted: Wed Oct 30, 2002 12:13 pm
by cooler75
hello,
i am still working on an uploading script, and would like to find out few things here:

1. my script would allow me to upload a script to a server directory, like say now i created a dir called images, what would be the absolute path to the images folder?

2. what is the easiest way to get the full path to the dir? when i used my files thru CuteFTP, i see something like 'var/www/html/test/images', is that what i use for path? but my script didnt work when i used that.

:oops:
thank you

use this

Posted: Wed Oct 30, 2002 2:07 pm
by phpScott
save this as a .php file , upload, and run this script. It will tell you.

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
    <title>root</title>
</head>

<body>
<?
   $root = getenv("DOCUMENT_ROOT");
   echo "root: ",$root,"<br>\n";
?>


</body>
</html>
phpScott

Posted: Thu Oct 31, 2002 6:56 am
by Wayne
'var/www/html/test/images' should have been
'/var/www/html/test/images' if that is the correct path