thinkphp autoload namespace custom namespace

高洛峰
Release: 2023-03-04 15:50:02
Original
1201 people have browsed it

In the process of using thinkPHP, some custom class libraries and third-party class libraries need to be placed in a suitable location. It does not feel good to place them in the system's default org folder, which destroys the native directory of thinkPHP.

I looked at the official manual and found that the namespace of the class library can be customized in the module or application configuration file.

thinkphp autoload 命名空间自定义 namespace

However, please note that your custom namespace name needs to correspond to your folder name and cannot be changed.

thinkphp autoload 命名空间自定义 namespace

Then test it

thinkphp autoload 命名空间自定义 namespace

thinkphp autoload 命名空间自定义 namespace

thinkphp autoload 命名空间自定义 namespace

# #The above is the entire content of this article, I hope you all like it.

For more thinkphp autoload namespace customization namespace related articles, please pay attention to the PHP Chinese website!

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