diff --git a/framework/helper.class.php b/framework/helper.class.php index 2a6c62f1b9..5c77e5ce28 100644 --- a/framework/helper.class.php +++ b/framework/helper.class.php @@ -626,6 +626,18 @@ function checkOtherPriv(array $actionConfig, string $action, object $item, objec return common::hasPriv($module, $method, $item); } +/** + * 检查是否启用APCu。 + * Check if APCu is enabled. + * + * @access public + * @return bool + */ +function isAPCuEnabled(): bool +{ + return extension_loaded('apcu') && ini_get('apc.enabled') == '1'; +} + /** * Set the parent property of the data. *