浅谈负载均衡(三)

2017-03-03

测试测试测试测试测试,测试内容...

我是标题

啊萨乌丁撒

<?php
class BlogC extends BaseC {
	
	function __construct()
	{
		$this->obj = new Blog();
	}
	public function Index()
	{ # 因为在配置中 该动作绑定了 hindex 所以手机版访问该动作时会指向hindex
		$this->cfg = [
			'N_list' => $this->obj->ListAll(args($_GET['p'],1,'d')),
			'N_purl' => url('Blog','Index',['p'=>'']),
			'T_list' => $this->obj->TagsTypeListTop(),
			'S_list' => $this->obj->TimeTypeListTop(),
			];
	}
	public function hindex()
	{ # 手机版独有页面 PC下无法访问 已绑定! 手机下双访问 index hindex都是访问到本页面 
		
	}
	public function details()
	{ # 文章详情

	}
	public function Select()
	{ # 搜索标签
		switch (args($_GET['k'],1,'d'))
		{
			case 1: # 标签编号
				$d = $this->obj->TidGetList(args($_GET['v'],1,'d'),args($_GET['p'],1,'d'));
				$a = ['k'=>1,'v'=>args($_GET['v'],1,'d'),'p'=>''];
			break;
			case 2: # 时间查询
				$d = $this->obj->TimeGetList(args($_GET['v'],201701,'d'),args($_GET['p'],1,'d'));
				$a = ['k'=>2,'v'=>args($_GET['v'],1,'d'),'p'=>''];
			break;
			case 3: # 标签名称搜索
				$a = ['k'=>3,'v'=>args($_GET['v'],1,'d'),'p'=>''];
			break;
			default:
				$d = $this->obj->ListAll(args($_GET['p'],1,'d'));
				$a = ['p'=>''];
			break;
		}
		$this->cfg = [
			'N_list' => $d,
			'N_purl' => url('Blog','Select',$a),
			'T_list' => $this->obj->TagsTypeListTop(),
			'S_list' => $this->obj->TimeTypeListTop(),
			];
	}
}



2

时间归档