How to automatically delete php tmp

藏色散人
Release: 2023-03-09 14:46:01
Original
2009 people have browsed it

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.

How to automatically delete php tmp

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!