<?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 xm
<head>
<me
<ti
</head>
<body>
hello, {$name}!
</body>
</html>
5,通过链接http://localhost/exd2/index.php/Index/index.html
和http://localhost/exd2/index.php/View/Index/index.html
访问不能获得指定模板的内容,这是为什么
最佳答案