Home > Backend Development > PHP Tutorial > Problem with automatic search path based on class name in PHP framework

Problem with automatic search path based on class name in PHP framework

WBOY
Release: 2016-07-28 08:28:54
Original
1096 people have browsed it

I am new to PHP. I looked at some frameworks and found that in a class, when new a new class, there is no include or require in this file. The instantiation can be completed according to the specific class name required. After looking at the code, I understand that a spl_autoload_register technology is used.
The following is a simple diagram
 PHP框架中根据类名自动搜索路径的问题
Component, controller, and interface are part of the many folders of the framework. In the logical process, there is no direct include or require of the component_XX class, which can be instantiated, mainly through the above spl_autoload_register technology.
Give me a link about this technology and you will know
http://blog.csdn.net/panpan639944806/article/details/23192267

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above has introduced the problem of automatically searching paths based on class names in the PHP framework, including aspects of it. I hope it will be helpful to friends who are interested in PHP tutorials.

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