Php,无法写入文件
Php, can not write to file
每次我 运行 它 file.txt 是 0kb
- 该文件的权限是 777 所有者 www-data:www-data
- /var/www/html 位于安装到服务器的外部 HD 上。
- 服务器是 Ubuntu 18.04
- Azure 托管
- PHP 7.2.19
- 阿帕奇 2
我有这个代码
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$file = 'file.txt';
$mf = fopen($file, 'w');
fwrite($mf, 'hi-----');
fclose($mf);
echo $file;
?>
原来我的磁盘 运行 已满 space 并且文件未被写入
每次我 运行 它 file.txt 是 0kb
- 该文件的权限是 777 所有者 www-data:www-data
- /var/www/html 位于安装到服务器的外部 HD 上。
- 服务器是 Ubuntu 18.04
- Azure 托管
- PHP 7.2.19
- 阿帕奇 2
我有这个代码
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$file = 'file.txt';
$mf = fopen($file, 'w');
fwrite($mf, 'hi-----');
fclose($mf);
echo $file;
?>
原来我的磁盘 运行 已满 space 并且文件未被写入