Why do I need to finish by using the fclose($handle) function after writing to a file using php? Doesn\'t the program automatically do this when it ends?
fclose($handle)
When a file is opened, a lock is placed on it, preventing other processes from using it. fclose() removes this lock.
fclose()
$handle is not an object, just a pointer. So there is no destructor telling it to unlock.
$handle