php代码如何写关闭文件功能?|宗九尘博客

关闭文件:

<?php
//bool fclose(resource $handle)
//假设当前目录是C:\xampp\htdocs\dophp\chapter2, 目录中包含文件1.txt
$handle = fopen("1.txt","w");
if(eclose($handle)){
    echo "关闭文件";
}
 else {
    echo "关闭失败!";
}
?>