hi,
found a solution for the problem.
the following code will throw the current
directory path into the $currentdir variable.
$currentdir = dirname($SCRIPT_FILENAME);
echo "<b>currentdir</b> $currentdir";
what this does is
1> $SCRIPT_FILENAME contains the whole path
of the unix eg /etc/httpd/htdocs/nilesh.php
2> the dirname() function returns the dir of
the passed $script_filename. in our case it
returns dirname(/etc/httpd/htdocs/nilesh.php)
which is /etc/httpd/htdocs (no end slashes)
Thanks jocke and brian for the tip.
nilesh :-)