【精粹】架构合理+强大的PHP框架再次推荐,傲视群雄~
【精华】架构合理+强大的PHP框架再次推荐,傲视群雄~~~~
示例展示
- PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><?phpclass IndexAction extends YouYaX{ //伪静态设置.html,注意这里配置了,下面全都要加上.html public function lizi1() { header("Content-type: text/html; charset=utf-8"); $this->display("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
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><include file="Tpl/top.html"><include file="Tpl/menu.html"> 这是一个伪静态示例,具体实现参考代码。。<include file="Tpl/foot.html"> </include></include></include>
在conf/config.php中设置 'static_url'=>'.html',
—————————————————————————————————————————————————
c.html 获取配置项
- HTML code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><include file="Tpl/top.html"><include file="Tpl/menu.html">输出值为:{cdata}<include file="Tpl/foot.html"></include></include></include>
其中 {cdata} 输出模板变量
————————————————————————————————————————————————

핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

AI Hentai Generator
AI Hentai를 무료로 생성하십시오.

인기 기사

뜨거운 도구

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

뜨거운 주제









HTML의 테이블 테두리 안내. 여기에서는 HTML의 테이블 테두리 예제를 사용하여 테이블 테두리를 정의하는 여러 가지 방법을 논의합니다.

HTML의 Nested Table에 대한 안내입니다. 여기에서는 각 예와 함께 테이블 내에 테이블을 만드는 방법을 설명합니다.

HTML 여백-왼쪽 안내. 여기에서는 HTML margin-left에 대한 간략한 개요와 코드 구현과 함께 예제를 논의합니다.

HTML 테이블 레이아웃 안내. 여기에서는 HTML 테이블 레이아웃의 값에 대해 예제 및 출력 n 세부 사항과 함께 논의합니다.

HTML 순서 목록에 대한 안내입니다. 여기서는 HTML Ordered 목록 및 유형에 대한 소개와 각각의 예에 대해서도 설명합니다.

HTML 입력 자리 표시자 안내. 여기서는 코드 및 출력과 함께 HTML 입력 자리 표시자의 예를 논의합니다.

HTML에서 텍스트 이동 안내. 여기서는 Marquee 태그가 구문과 함께 작동하는 방식과 구현할 예제에 대해 소개합니다.

이 튜토리얼은 PHP를 사용하여 XML 문서를 효율적으로 처리하는 방법을 보여줍니다. XML (Extensible Markup Language)은 인간의 가독성과 기계 구문 분석을 위해 설계된 다목적 텍스트 기반 마크 업 언어입니다. 일반적으로 데이터 저장 AN에 사용됩니다
