linux下删除7天前日志的代码(php+shell)
PHP版本: 实现代码如下: /** * 删除7天前的日志 * @param $logPath */ function del7daysAgoLog($logPath) { if(empty($logPath))return; $handle = opendir($logPath); while((
PHP版本: 实现代码如下: /** * 删除7天前的日志 * @param $logPath */ function del7daysAgoLog($logPath) { if(empty($logPath))return; $handle = opendir($logPath); while((