Does 'fopen' work only within the same directory?
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Does 'fopen' work only within the same directory?

From: <francescomoi@usa.com>
Date: Tue Sep 13 2005 - 17:19:36 CEST

I'm trying to read a file with PHP:

--------------------
$fileToRead = "foo.txt"; //Option-1
#$fileToRead = "/home/frank/otherdir/foo.txt"; //Option-2

$dataFile = fopen($fileToRead, "r") ;
-------------------

Option-1 works but Option-2 doesn't, but 'foo.txt' is COMPULSORY within
another
directory.

What can I do? Regards.
Received on Tue Oct 18 02:23:01 2005