Why is unlink successful on an open file?
问题 Why open file is deleted? On Windows Xamp, I get message "still working", but on other PHP serwer file is deleted, even if it is open and I get message "file deleted". I can delete file from FTP too, even if first script is still working :( <?php $handle = fopen("resource.txt", "x"); sleep(10); ?> <?php if (file_exists("resource.txt") && @unlink("resource.txt") === false) { echo "still worning"; exit; } else echo "file deleted"; ?> 回答1: UNIX systems typically let you do this, yes. The