ThinkPHP
文章平均质量分 60
Tim_SK
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
ThinkPHP内容管理系统开发日记(一)--规划数据库。
普通记录会员资料的数据库结构: CREATE TABLE `php_user`( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, `username` VARCHAR(30) NOT NULL, `cnname` VARCHAR(30) NOT NULL, `password` CHAR(32) NOT NULL, `email`原创 2016-08-31 19:06:03 · 794 阅读 · 0 评论 -
ThinkPHP内容管理系统开发日记(二)--本地环境
1.下载安装WAMP2.4 2.设置Apach.conf->Listen:8080 ->DocumentRoot "I:/www". 3.下载ThinkPHP3.1.3 并且放在DocumentRoot下的项目文件夹(I:/www/PHP/ThinkPHP)原创 2016-08-31 21:57:52 · 758 阅读 · 0 评论 -
ThinkPHP内容管理系统开发日记(三)--创建自己的APP
1.创建入口文件:www/PHP/user.php <?php //User App 的入口文件 define('APP_NAME','User');//定义App名字 define('APP_PATH','./User/');//定义App路径 define('APP_DEBUG',true);//开启调试模式 require('./ThinkPHP/ThinkPHP.php');/原创 2016-08-31 22:08:26 · 980 阅读 · 0 评论 -
笔记--ThinkPHP的配置文件
1.框架的配置文件在ThinkPHP/Conf/convertion.php 2.项目配置文件APP/Conf/config.php <?php return array( //'配置项'=>'配置值' 'name'=>'Tim', ); ?>输出配置的方法为C方法: <?php // 本类由系统自动生成,仅供测试用途 class IndexAction extends Action {原创 2016-08-23 11:52:31 · 415 阅读 · 0 评论 -
ThinkPHP内容管理系统开发日记(四)-- 配置信息与开发Longin模块以及模板
配置信息如下/php/user/conf/config.php <?php return array( //'配置项'=>'配置值' // /* 数据库设置 */ 'DB_TYPE' => 'mysql', // 数据库类型 'DB_HOST' => 'localhost', // 服务器地址 'DB_NAME' => 'php', // 数据库名 'DB_U原创 2016-09-01 11:49:15 · 872 阅读 · 0 评论 -
笔记--ThinkPHP的URL模式
<?php // 本类由系统自动生成,仅供测试用途 class IndexAction extends Action { public function index(){ //echo 'hello, world!'; //echo C('URL_MODEL'); //U方法(1.模块名,2数组array("id"=>1),3.后缀名“html shtml”,4.是否跳转(tru原创 2016-08-23 12:56:18 · 438 阅读 · 0 评论 -
笔记--ThinkPHP运行流程
在浏览器中输入:http://localhost:8081/test313/index.php?m=index&a=test <?php /* 1.加载ThinkPHP.php require('./ThinkPHP/ThinkPHP.php'); 2.加载核心文件 ./ThinkPHP/lib/core 3.加载项目文件 分析URL 调用相关控制器 m module 模块 控制器 a原创 2016-08-23 11:03:02 · 504 阅读 · 0 评论 -
笔记--URL伪静态
好处是,让搜索引擎蜘蛛认为我们的网页为静态网页,以最快的速度爬取。 设置: ‘URL_HTML_SUFFIX’=>'html', //默认URL 伪静态后缀设置 把不要改变框架默认convention.php的设置,而是要将自己的设置放在 APP/Conf/config.php中: ‘URL_HTML_SUFFIX’=>'html|shtml', //默认URL 伪静态后缀设置原创 2016-08-23 13:53:47 · 438 阅读 · 0 评论 -
笔记--ThinkPHP的函数库
框架目录: U函数:./ThinkPHP/Common/function.php C函数:./ThinkPHP/Common/common.php 自定义函数目录: ./APP/Common/common.php: 定义后可以直接调用在indexAction.class.php中 dump函数可以直接dump 数组: $arr=array(1,2,3,4,5); dump($ar原创 2016-08-23 14:01:10 · 352 阅读 · 0 评论 -
笔记--ThinkPHP模板文件
1.在APP/tpl下建立Action同名的文件夹 然后建立模板文件,如:index.html 2.在哪IndextAction.class.php中调用模板: $this->display(); 或$this->display('test');原创 2016-08-23 14:21:05 · 428 阅读 · 0 评论 -
笔记--ThinkPHP模板的变量使用与运算以及模板函数调用
模板: index.html Title This is the test index p11age! {$me['name']} {$me.name} {$me['sex']|default='girl'} {//$me.age-1 //这种点号的方式不能正确计算,如果需要计算要用下面这种} {$me['age']-1} {$me['name']|md5原创 2016-08-24 10:50:49 · 2723 阅读 · 0 评论 -
笔记--ThinKPHP模板循环之for,foreach,volist
模板: index.html Title This is a test! {$data['name']}-----{$data['age']} {$data['name']}-----{$data['age']} eq = neq != gt > egt >= lt < elt <= heq === nheq !== {$k}原创 2016-08-24 11:37:36 · 7039 阅读 · 0 评论 -
笔记--ThinkPHP模板判断之if elseif else
模板: index.html Title This is a test! num 大于10 num小于10 num等于10 Control: <?php // 本类由系统自动生成,仅供测试用途 class IndexAction extends Action { public function index(){ $num原创 2016-08-24 11:53:43 · 7024 阅读 · 0 评论
分享