最新下载
热门教程
- 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')) { |
相关文章
- 《夜族崛起》铁匠西里尔位置一览 05-17
- 《寓言之地》1.02更新内容一览 05-17
- 《辐射4》steam好评率介绍 05-17
- 《夜族崛起》技能强化珠宝掉落说明 05-17
- 《辐射4》主机控制台介绍 05-17
- 《星露谷物语》海草和绿藻获取方法 05-17