Home  >  Article  >  php教程  >  thinkphp autoload 命名空间自定义 namespace,thinkphpautoload

thinkphp autoload 命名空间自定义 namespace,thinkphpautoload

WBOY
WBOYOriginal
2016-06-13 08:57:53717browse

thinkphp autoload 命名空间自定义 namespace,thinkphpautoload

使用thinkPHP过程中,一些自定义的类库和第三方类库需要找一个合适的位置放置,放到系统默认的org文件夹感觉不太好,破坏了thinkPHP的原生目录。

就看了一下官方手册,可以在模块或者应用的配置文件里自定义类库的命名空间。

 

 

 

不过使用中需要注意的是,你的自定义的命名空间名称需要和你的文件夹名称相对应,不能更改。

然后测试一下

Statement:
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