The solution to automatic deletion of php tmp: first enter the WIN2003 system; then use the system's scheduled task to call batch processing and clean up tmp regularly.
The operating environment of this article: windows server 2003 system, PHP7.1 version, DELL G3 computer
Specific questions:
How to set php to automatically delete temporary files starting with sess_ in the tmp folder?
The server is WIN2003 PHP MYSQL. When I restarted the server recently, MYSQL started very slowly. I checked that there are more than 300,000 temporary files starting with sess_ under c:\windows\temp. Can I set PHP to automatically delete these files?
After checking the folder permissions, there should be no problem.
Solution:
Use the system's scheduled task to call batch processing and clean it regularly.
Under normal circumstances, there should not be so many temporary files in the temp directory. They should be deleted or updated by the program itself.
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of How to automatically delete php tmp. For more information, please follow other related articles on the PHP Chinese website!