Home  >  Article  >  Backend Development  >  新手用TP框架实例化Model时出现有关问题

新手用TP框架实例化Model时出现有关问题

WBOY
WBOYOriginal
2016-06-13 12:22:24788browse

新手用TP框架实例化Model时出现问题
1.新手想用TP框架写一个登陆功能,这个是控制器里面的login方法,验证码输入成功后进入else里,实例化Model,想查数据库。


2.这个是Model里的方法,我想输出一下查询数据库的到的内容


3.但为什么返回登陆界面调试的时候,一按登陆,就会跳出这个叫我下载,并没有输出查询数据库的内容?如果我不实例化Model,单单是在else里面直接echo东西是能echo出来的

------解决思路----------------------
header输出是什么?
------解决思路----------------------
应该是一个文件的扩展名不对,导致浏览器没法读取、解析,你找到login的文件看看
------解决思路----------------------
断点调试看下,应该是代码哪里有问题,暂时无法通过你的代码看出问题。

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