文件操作 - RuleTester.php
返回文件管理
返回主菜单
删除本文件
文件: /storage/v12552/i2kplay/public_html/wp-content/plugins/ultimate-410/src/RuleTester.php
编辑文件内容
<?php namespace TinyWeb\Ultimate410; class RuleTester { private $regex; private $rule; public function __construct(\stdClass $obj) { $this->regex = (bool)$obj->regex; $this->rule = $obj->request; } public function test($request) { if ($this->regex) { return (bool)(preg_match($this->rule, $request) ?: preg_match($this->rule, urldecode($request))); } if (str_contains($this->rule, "'")) { $this->rule = preg_replace("/((?<!\\\)')/", '\\\'', $this->rule); } return strcasecmp($request, $this->rule) === 0 || strcasecmp(urldecode($request), $this->rule) === 0 || strcasecmp(urldecode($request), urldecode(Plugin::sanitize($this->rule))) === 0; } }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件