I'm relatively new to configuring Apache.
I have a PHP script that writes a JSON file based on values retrieved from $_GET
.
<?php
file_put_contents('State.json', "{ do: '" . $_GET['do'] . "' }");
echo "Success";
?>
I run that code by create an XHR request.
Ally.xhr('/Cream/Foam?do=someCommand');
The page it returns says failed to open stream: Permission denied on line 3.
<Directory "~/Dropbox/Web">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Those are the permissions given to the root server folder.
What do I need to change to allow PHP to write the file?
(I have pretty much no idea what the block above means.)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…