PHP出现Cannot declare class WxPayApi, because the name is already in use错误

PHP出现Cannot declare class WxPayApi, because the name is already in use错误

博客说明

文章所涉及的资料来自互联网整理和个人总结,意在于个人学习和经验汇总,如有什么地方侵权,请联系本人删除,谢谢!

错误

Cannot declare class WxPayApi, because the name is already in use

错误原因

在一个PHP文件中多次调用引入同一个类文件

解决办法

使用include_once或者require_once来加载类文件

感谢

万能的网络

以及勤劳的自己

发布了191 篇原创文章 · 获赞 513 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/qq_45163122/article/details/105080069
今日推荐