文件读写不起作用

时间:2016-12-13 08:07:15

标签: php

我在slim framework 3的中间件中使用基本文件读写功能。

$file = __DIR__ . '\\result.json';
$fh = fopen($file, 'w') or die('Cannot open files:  '.$file); 

此文件存在且路径正确。我也有权读取和写入文件。

结果显示无法打开文件。

请建议简单的读写功能如何在slim framework 3中运行。

0 个答案:

没有答案
相关问题