PHP File_put_contents not working

白昼怎懂夜的黑 提交于 2019-11-29 18:23:55

You can't write a remote file via http.(If you could do that, every one else could change that file also.)

You need to use the local path.

try changing directory properties

chown www-data:www-data <dirname>

and/or write as follows, if you host on linux

<?php
$var ="hi";
shell_exec('echo "'.$var.'">>log.txt');
?>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!