为了账号安全,请及时绑定邮箱和手机立即绑定

thinkphp5 引入think\View 报错

thinkphp5 引入think\View 报错

PHP
慕盖茨4494581 2019-03-09 01:19:19
问题描述 在使用 use thinkView 报错 ,提示 think : undefined namespace think 问题出现的平台版本及自己尝试过哪些方法 相关代码 // 请把代码文本粘贴到下方(请勿用图片代替代码)<?phpnamespace appdemocontroller; use thinkView; class Index{ public function index() { $view=new View(); return $view->fetch('index'); } } 你期待的结果是什么?实际看到的错误信息又是什么?
查看完整描述

3 回答

?
慕姐8265434

TA贡献1813条经验 获得超2个赞

use thinkView;
改成 use think\View
查看完整回答
反对 回复 2019-03-18
?
不负相思意

TA贡献1777条经验 获得超10个赞

图片描述
https://img1.sycdn.imooc.com//5c8f3c3700012b8908000551.jpg

https://img1.sycdn.imooc.com//5c8f3c390001e14006420494.jpg

查看完整回答
反对 回复 2019-03-18
?
幕布斯6054654

TA贡献1876条经验 获得超7个赞

你这个,库文件都不存在啊,怎么可能use呢,你没发现use think\View是红色的吗?

查看完整回答
反对 回复 2019-03-18
  • 3 回答
  • 0 关注
  • 411 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信