Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我使用fopen();然后我使用fclose();它只是关闭文件还是清理内存?
fopen();
fclose();
它还清理内存。
顺便说一句,PHP 使用自己的垃圾收集功能自行完成(即使没有显式关闭指针)。不过,明确地关闭它仍然是一个好习惯。