简体   繁体   中英

Clear error_log file with PHP

Okay, so my error log files are getting filled up really fast due to some unfixable errors (they exist due to the site's design) and it's using up a lot of my webspace pretty fast.

However, I do not need the error_log files at all. I've been looking around and I cannot find a way to stop error_logs in cPanel, so I thought that perhaps I could run a script on each page a user visits that empties or deletes the error_log file.

Is this possible? the error_log file is in the document root of each of my websites

您可以使用相应的php.ini设置禁用错误日志记录: http : //php.net/manual/en/errorfunc.configuration.php#ini.log-errors

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM