PHP fclose () ฟังก์ชัน
ความหมายและการใช้งาน
fclose () ฟังก์ชันปิดแฟ้มเปิด
หากประสบความสำเร็จฟังก์ชั่นส่งกลับค่า TRUE ในความล้มเหลวกลับ FALSE
ไวยากรณ์
fclose(file)
参数 | 描述 |
---|---|
file | 必需。规定要关闭的文件。 |
ตัวอย่าง
<?php
$file = fopen("test.txt","r");
//some code to be executed
fclose($file);
?>
$file = fopen("test.txt","r");
//some code to be executed
fclose($file);
?>
เสร็จสมบูรณ์คู่มือการใช้งานระบบแฟ้ม PHP อ้างอิง