您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

【精粹】架构合理+强大的PHP框架再次推荐,傲视群雄~

2024/2/22 4:14:12发布18次查看
【精华】架构合理+强大的php框架再次推荐,傲视群雄~~~~
示例展示
php codedisplay(lizi1.html); } //获取配置项 public function getc(){ $this->assign('cdata',c('static_url')); $this->display('c.html'); } //跳转方法 public function jump(){ $this->redirect(index/lizi1.html); } //增加数据,常规操作 public function adddata(){ $data['title']='changshu'; $this->add($data,demo); $this->redirect(index/lizi1.html); } //更新数据 public function savedata(){ $data['title']='changshu2'; $this->save($data,demo,1); $this->redirect(index/lizi1.html); } //查找单条数据集 public function finddata(){ $data=$this->find(demo,string,1); $this->assign('data',$data); $this->display('find.html'); } //查找数据集合 public function seldata(){ $data=$this->select(select * from demo where id between 1 and 3); $this->assign('data',$data); $this->display('sel.html'); } //删除数据,略 //数据表实例化操作 public function tadd(){ $u=t(demo); $u->title='nantong'; $u->add(); $this->redirect(index/lizi1.html); } //实例化更新数据 public function tsave(){ $u=t(demo); $u2=$u->find(1); $u2->title='suzhou'; $u2->save(); $this->redirect(index/lizi1.html); } //查找数据集,,集合等等,省略,,参阅中文手册 //多语言,要修改lng/lang.php public function lang(){ $this->display('lang.html'); } //验证方法,要修改model/model.php public function vali(){ $data=''; //$data=hell; if(match($data,title)){ $this->redirect(index/lizi1.html); } } //二维数组调用函数,使用common/common.php public function common(){ $u=t(demo); $data=$u->select(1,2,3); $this->assign('data',$data); $this->display(common.html); } //大型复杂项目循环数组运算使用,注意$this->array_array $this->array_two的用法 public function dophp(){ $data=$this->select(select * from demo); $this->assign('data',$data); $this->display('fuza.html'); }}?>
――――――――――――――――――――――――――――――――――――――――――――――――
lizi1.html 伪静态的配置
html code 这是一个伪静态示例,具体实现参考代码。。
在conf/config.php中设置 'static_url'=>'.html',
―――――――――――――――――――――――――――――――――――――――――――――――――
c.html 获取配置项
html code输出值为:{cdata}
其中 {cdata} 输出模板变量
――――――――――――――――――――――――――――――――――――――――――――――――
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product