| 1234567891011121314151617181920 |
- <?php
- /**
- * 判断是否为不可操作id
- *
- * @param number $id 参数id
- * @param string $configName 配置名
- * @param bool $emptyRetValue
- * @param string $split 分隔符
- * @return bool
- */
- if (!function_exists('is_config_id')) {
- function is_config_id($id, $configName, $emptyRetValue = false, $split = ",")
- {
- if (empty($configName)) return $emptyRetValue;
- $str = trim(config($configName, ""));
- if (empty($str)) return $emptyRetValue;
- $ids = explode($split, $str);
- return in_array($id, $ids);
- }
- }
|