How can I forcibly delete files that are locked by other programs using php .. unlink cannot be used to delete occupied files. Is there any good way to do this? Thank you ------ solution ------------------ killing the process that occupies it is not a strong point of php ------ solution -------------------- there is no good solution, only in this way. If it cannot be deleted, stop other programs and then delete them. ------ Could you tell me how to forcibly delete the locked files occupied by other programs using php ..
Unlink cannot be used to delete occupied files. Is there any good method? thank you.
------ Solution --------------------
Kill the process that occupies him
This is not the strength of php.
------ Solution --------------------
There is no good way to do this. If it cannot be deleted, stop other programs and then delete them.
------ Solution --------------------
Permission denied has insufficient permissions. use the cli of another root identity to execute unlink.
------ Solution --------------------
I'm wondering why this operation is required.
This should be noted during programming.
If this is unavoidable, you should write an interface for the program that occupies the file to release it.