最新下载
热门教程
- 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')) { |
|
相关文章
- 拼多多怎么设置匿名评价 07-16
- 无限暖暖灵感之旅·菇菇聚落及盐晶滩任务指南 07-16
- 360软件管家怎么收藏软件 07-16
- 龙族卡塞尔之门命轮系统使用方法一览 07-16
- 《星际迷航 航海家号 - 跨越未知》将于下月登陆 Switch 2 07-16
- 抖币充值入口的官网-抖币充值官网的发票申请入口 07-16