|
Posted by Geoff Berrow on 11/26/05 01:26
Message-ID: <1a5fo15abhng32vj8r7lvenrfodjmjqe6q@4ax.com> from FayeC
contained the following:
>I tried it and just modified the path as it is adding the username to
>the path but I then get several errors
>regarding not opening the stream and also a division by 0:
Yeah, the path has to be the full path to the directory. But I'm doing
it slightly differently now.
I've replaced:
//$dir = $path."";
$path=$_SERVER['PATH_TRANSLATED'];
//print "$path<br>";
$i= strlen($path);
//print"$i<br>";
do{$i--;}
while(strpos($path,"/",$i)===false);
//print"$i<br>";
//print substr($path,0,$i);
$path=substr($path,0,$i+1);
$dir=$path;
with
$path=$_SERVER['SCRIPT_FILENAME'];
$dir=dirname($path);
This will give you the path to the current directory. You'll have to
append any subdirectory info to that.
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Navigation:
[Reply to this message]
|