Hi,
So, I'm running OS X (10.4.10) with the original Apache install (1.3.4 I think), and PHP 5.1.4. All I want to do is open & write to a file, here is my code:
<?php
$File = "YourFile.txt";
$Handle = fopen($File, 'w');
$Data = "Jane Doe\n";
fwrite($Handle, $Data);
$Data = "Bilbo Jones\n";
if(fwrite($Handle, $Data)) {
echo "Done";
} else {
echo "Not Done";
}
fclose($Handle);
?>
All I ever get on the page is Not Done, which supposedly indicates in can't write to the file, as it can't open it. I checked in the directory, and there's no YourFile.txt, so I have no idea what's happening. Any ideas?
If suggesting I update my PHP install please tell me how, as Entropy.ch only provides (currently) the version I'm using now.
Thanks,
George.