通过display方法输出
想分配变量可以使用assign方法
方法调用模板:C层调用V层
模板不存在[./Home/Tpl/Index/index.html]
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="Generator" content="EditPlus?">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<title>Document</title>
</head>
<body>
<h1>scan hello world!!!</h1>
</body>
</html>
C控制V页面输出
寻找模板的规律:
Index模块/index方法
C:\wamp\www\thinkphp\Home\Tpl\Index\index.html
模块名\方法名
访问show方法:
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="Generator" content="EditPlus?">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<title>Document</title>
</head>
<body>
<h1>访问show!!!</h1>
</body>
</html>
修改定界符:
mysql> show create table user\G;
*************************** 1. row ***************************
Table: user
Create Table: CREATE TABLE `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(30) DEFAULT NULL,
`sex` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
1 row in set (0.00 sec)
array (size=2)
0 =>
array (size=3)
'id' => string '1' (length=1)
'username' => string 'zhaotongzhen' (length=12)
'sex' => string '0' (length=1)
1 =>
array (size=3)
'id' => string '2' (length=1)
'username' => string 'mm' (length=2)
'sex' => string '1' (length=1)
hello world