Is PHP allowed to modify .htaccess file in current folder?
问题 I have a PHP web app located on shared hosting . My goal is to modify .htaccess file from PHP code when the PHP page is running. I need that .htaccess to insert a couple of mod_rewrite lines into it. The problem is that on Windows+Apache I can dynamically modify .htaccess file but the same code on Linux reports a problem when I try to access this file in any way (copy or fopen): "failed to open stream: Permission denied" I have given .htaccess file 777 permissions - still no result. WHat