Is there a way to create a file with PHP when fopen
is disabled? Other functions to access the file system are enabled such as file_get_contents()
.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
look up file_put_contents()... though if fopen has been disabled it may also be disabled. Getting and putting files are two different things from a permissions perspective.
And if fopen has been disabled, I can't imagine that exec() hasn't also been disabled.
回答2:
touch('file.txt');
Maybe the simplest.