ThinkPHP Model 与 Action 用法
一直听说ThinkPHP可以使用Model调取数据库,今日才会用Model,在Action中使用D方法条用Model中函数.
D("Model名字")->函数名.
例:D("User")->getList();
调用 UserModel.php 文件中 的 function getLiser() 函数,在Model下的函数使用 $this 代表实例化当前 Model名字的表,Model下文件一般以 数据库表名+Model.php 命名
查看更多关于ThinkPHP Model 与 Action 用法 - Thinkphp的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did6259