thinkPHP 入门

   下载地址: [url=http://wapjin.com/ThinkPHP.zip]thinkPHP3.2.zip下载[/url]
define('APP_PATH','./Application/');//配置路径
[h3]后台处理[/h3]
文件路径:../Application/Home/Controller/IndexController.class.php
<?php
// 本类由系统自动生成,仅供测试用途
namespace HomeController;
use ThinkController;
class IndexController extends Controller {
    public function index(){
		
	$name = I('get.ac');//获取数据
	//$name = "cccc";
$this->assign('name',$name);//提交数据
$this->display("a");//设置文件名
	
    }
}
 [h3]显示模板[/h3]
文件路径:../Application/Home/View/Index/a.jin
你好  {$name}

<form action="./">
First name:<br>
<input type="text" name="ac" >
<br>
<input type="submit" value="Submit">
</form> 
{$name}//调用

评论

刷新

友情链接