且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

PHP无法打开流:是目录

更新时间:2023-11-28 19:34:34

您的问题是您没有定义实际的文件,而只是定义目录.

Your problem is that you're not defining the actual file, only a directory.

$file = $dir . '/export.txt';
file_put_contents($file, $drop);

否则,PHP将如何知道将内容放置在何处?

Otherwise, how will PHP know where to place the content?