PHP file doesn't write to current directory?
问题 I have a PHP file on a web-host that is as follows: <?php file_put_contents('test.txt','TEST'); echo 'OK'; ?> But the file test.txt is not created when I execute the page from a browser. Why not? Is it a permissions issue? 回答1: yes the PHP Doc Says If filename does not exist, the file is created. Otherwise, the existing file is overwritten, unless the FILE_APPEND flag is set. That is only if you write have permission on that folder .... try error_reporting(E_ALL); ini_set("display_errors",