我有这个简单的代码:
<?php
$myFile ='test.txt';
$myContent ='Some text';
file_put_contents($myFile, utf8_encode($myContent));
?>
test.txt 文件的位置在这里:
/srv/www/htdocs/didebansnort
我在浏览器中编写此 php 代码的页面:
http://localhost/didebansnort/testdl.php
代码不起作用它不会在上面写字符串
结果:在属性中设置权限是不够的