最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
php判断类是否存在函数 class_exists
时间:2022-07-02 09:51:36 编辑:袖梨 来源:一聚教程网
//bool class_exists ( string $class_name [, bool $autoload = true ] )
//此功能是否给定的类被定义检查。this function checks whether or not the given class has been defined.
//返回true,如果class_name是一个定义的类,否则返回false。
//实例
代码如下 | 复制代码 |
if (class_exists('myclass')) { $myclass = new myclass(); } |
代码如下 | 复制代码 |
function __autoload($class) // check to see whether the include declared the class if (class_exists('myclass')) { |
相关文章
- 价格跟踪交易-价格跟踪交易软件 04-25
- 碧蓝航线使用要注意什么 04-25
- 明日之后苹果能做什么食物攻略 04-25
- 以闪亮之名浅栗捏脸数据id攻略 04-25
- 逆水寒手游春归学堂奇遇如何完成 04-25
- 明日之后二层别墅建造蓝图攻略 04-25