Thinkphp3.2根据说明配置好信息之后,通过链接获取不到模板view的内容

浏览:1976 发布日期:2014/01/19 分类:求助交流 关键字: 3.2访问不到模板的内容
1,在htdocs新建一个test文件夹,并在里边新建一个index.php文件,内容为
<?php
// 开启调试模式 建议开发阶段开启 部署阶段注释或者设为false
define('APP_DEBUG',True);
// 定义应用目录
define('APP_PATH','./');
// 加载框架入口文件
require("../ThinkPHP/ThinkPHP.php");
?>

2,访问刚创建的index.php页面,在test文件夹了成功生成了
Common
Home
Runtime
三个文件夹

3,在Home/Controller/IndexController.class.php中
将函数的内容public function index()改为
$name = 'ThinkPHP';
$this->display();

4,在Home/View/下新建Index文件夹,并在该文件夹创建html文件,内容为:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>

<body>
hello, {$name}!
</body>
</html>

5,通过链接http://localhost/exd2/index.php/Index/index.html
和http://localhost/exd2/index.php/View/Index/index.html
访问不能获得指定模板的内容,这是为什么
最佳答案
评论( 相关
后面还有条评论,点击查看>>