So I am using the following code:
Code: Select all
<?php
$f = @fopen("files/admin.dat", "w"); // for writing, truncated
if ($f == FALSE)
{ chmod("files", 0777); // this is line 114
$f = @fopen("files/admin.dat", "w");
}
fwrite($f, $a);
fclose($f); // continue on to display
?>I have tried setting up the upload without the directory and creating the directory (with the proper permission) but have the same problem "permission denied."
Do I have any option here other than writing some lengthy tutorial to the unsophisticated user about unix permissions and how to set them using each of several dozen possible protocols (ws_ftp, etc) and causing nost potential users to say "to hell with it"?