* @access public
* @return void
*/
public function gc(): void
{
$lifetime = $this->config['expire'];
$now = time();
$files = $this->findFiles($this->config['path'], function (SplFileInfo $item) use ($lifetime, $now) {
return $now - $lifetime > $item->getMTime();
});
foreach ($files as $file) {
$this->unlink($file->getPathname());
}
}
/**
* 查找文件
s | /so/手绘海景别墅风景油画装饰,海景油画.html |
USER | www |
HOME | /home/www |
HTTP_X_FORWARDED_PROTO | https |
HTTP_X_REAL_IP | 8.217.199.247 |
HTTP_CONNECTION | close |
HTTP_X_FORWARDED_FOR | 220.181.57.216,8.217.199.247 |
HTTP_CLIENT_IP | 220.181.57.216 |
HTTP_REFERER | http://www.baidu.com/search/spider.html |
HTTP_ACCEPT | */* |
HTTP_USER_AGENT | Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html) |
PATH_INFO | |
HTTP_HOST | www.16757.com |
REDIRECT_STATUS | 200 |
SERVER_NAME | www.16757.com |
SERVER_PORT | 443 |
SERVER_ADDR | 61.160.195.130 |
REMOTE_PORT | 36896 |
REMOTE_ADDR | 111.173.80.27 |
SERVER_SOFTWARE | nginx/1.26.2 |
GATEWAY_INTERFACE | CGI/1.1 |
HTTPS | on |
REQUEST_SCHEME | https |
SERVER_PROTOCOL | HTTP/1.1 |
DOCUMENT_ROOT | /www/wwwroot/www.16757.com/public |
DOCUMENT_URI | /index.php |
REQUEST_URI | //so/%E6%89%8B%E7%BB%98%E6%B5%B7%E6%99%AF%E5%88%AB%E5%A2%85%E9%A3%8E%E6%99%AF%E6%B2%B9%E7%94%BB%E8%A3%85%E9%A5%B0%EF%BC%8C%E6%B5%B7%E6%99%AF%E6%B2%B9%E7%94%BB.html |
SCRIPT_NAME | /index.php |
CONTENT_LENGTH | |
CONTENT_TYPE | |
REQUEST_METHOD | GET |
QUERY_STRING | s=/so/%E6%89%8B%E7%BB%98%E6%B5%B7%E6%99%AF%E5%88%AB%E5%A2%85%E9%A3%8E%E6%99%AF%E6%B2%B9%E7%94%BB%E8%A3%85%E9%A5%B0%EF%BC%8C%E6%B5%B7%E6%99%AF%E6%B2%B9%E7%94%BB.html |
SCRIPT_FILENAME | /www/wwwroot/www.16757.com/public/index.php |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1729566144.9777 |
REQUEST_TIME | 1729566144 |