Home  >  Article  >  Backend Development  >  What is the essential difference between D() and M() in ThinkPHP?? I feel that the manual is not very clear.

What is the essential difference between D() and M() in ThinkPHP?? I feel that the manual is not very clear.

WBOY
WBOYOriginal
2016-12-01 01:27:581206browse

What is the essential difference between D() and M() in ThinkPHP?? It feels like the manual is not very clear

Reply content:

What is the essential difference between D() and M() in ThinkPHP?? It feels like the manual is not very clear

d and m are both factory methods of the model layer. m can only instantiate the method of tp’s built-in model layer base class, which is more efficient, while d can generate the model layer code you created in the model directory

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