Does PHP automatically close the file after a file();
function, or does it require fclose();
or similar?
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Keeping track of variable instances
- Can php detect if javascript is on or not?
No,
file()
doesn't require afclose()
call. You can see that in the source code of the function that it all ends nice and clean, so you don't have to callfclose()
or do anything similar, you simple can callfile()
.Source code:
See at the end 3rd line from the bottom it ends the function nice and clean: