ramrocket
asked on
Why can't I FOPEN a file?
I just want to do a simple write i/o:
$filename="testdata.txt";
$fp =fopen($filename, "w") or die("Error opening file");
fwrite($fp,'this is a test');
fclose($fp);
I get this error PHP4:
Warning: fopen(testdata.txt): failed to open stream: HTTP wrapper does not support writeable connections.
thanks in advance
$filename="testdata.txt";
$fp =fopen($filename, "w") or die("Error opening file");
fwrite($fp,'this is a test');
fclose($fp);
I get this error PHP4:
Warning: fopen(testdata.txt): failed to open stream: HTTP wrapper does not support writeable connections.
thanks in advance
ASKER
I tried:
1. $filename=$_SERVER['DOCUME NT_ROOT'] . '/latlon_web/data/testdata .txt';
2. $filename= "file://testdata.txt";
no luck.
1. $filename=$_SERVER['DOCUME
2. $filename= "file://testdata.txt";
no luck.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
$filename = "file://testdata.txt";