php开发问题-class_exists

WBOY
Release: 2016-06-23 13:15:37
Original
1144 people have browsed it

        判断类是否存在的时候,提示错误信息 找不到文件  include(XXXXX.php): failed to open stream: No such file or directory

所有在使用class_exists时先要判断类的文件是否存在,代码如下:

file_exists('../xxxx/'.$class_name)&&class_exists($class_name)
Copy after login


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template