| Posted by moriman on 11/25/05 01:36 
Hi,
 I'm having a problem referring to other files in my public_html directory Ώ
 
 Below is a short script (test.php) to show the problem...
 
 <?php
 $filename1 = "c:\\\\xitami-25\\app\\public_html\\title.php";
 $filename2 = "http://home/title.php";
 $filename3 = "title.php";
 
 echo "\n";
 echo $filename1."\n";
 if (file_exists($filename1)){echo "found it\n";}
 else {echo "not found\n";}
 
 echo $filename2."\n";
 if (file_exists($filename2)){echo "found it\n";}
 else {echo "not found\n";}
 
 echo $filename3."\n";
 if (file_exists($filename3)){echo "found it\n";}
 else {echo "not found\n";}
 ?>
 
 both the above test.php and the file it refers to, title.php are in the same
 directory.
 Running the above under dos gives the following results...
 
 c:\\xitami-25\app\public_html\title.php
 found it
 http://home/title.php
 not found
 title.php
 found it
 
 Running it under windows gives this...
 
 c:\\xitami-25\app\public_html\title.php
 found it
 http://home/title.php
 not found
 title.php
 not found
 
 the url for the test.php is http://home/test.php
 how come it doesn't find either filename2 or 3?
 
 under dos I'm running test.php from within it's own directory. It finds
 filename1 and 3.
 
 Can someone help me to understand what is happening here?
 
 many thanks in advance,
 
 mori
  Navigation: [Reply to this message] |