i**p 发帖数: 8 | 1 代码这样:
if (is_writable("test.txt"))
{
echo "writeable";
$file = fopen("test.txt","w");
echo fwrite($file,"Hello World. Testing!");
fclose($file);
}
else
{
echo "we cannot write";
}
?>
结果是:
writable0
文件为何没有写入呢?硬盘上文件已经创建成功,大小为0。 | g**e 发帖数: 6127 | 2 writeable21 is what I got
【在 i**p 的大作中提到】 : 代码这样: : : if (is_writable("test.txt")) : { : echo "writeable"; : $file = fopen("test.txt","w"); : echo fwrite($file,"Hello World. Testing!"); : fclose($file); : } : else
|
|