- 博客(17)
- 收藏
- 关注
原创 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
原创 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
原创 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
原创 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
转载 Sublime Text 3 绝对神器
原文地址 距第一篇的开箱水文,已经有4个月的时间了,但因为懒,就没有下文了。终于,今天,我觉得写一篇准技术文章了。 忘记了是怎么开始用的ST,应该是在网上看到别人推荐才用到吧,用了有半年了。在windows下是绝对的神器,Notepad++之类的无可比拟;linux下,因为有个vim,鄙人对vim不懂,所以孰好孰更好,不好说。总结起来就是,神器一般的轻量级的面向php、pyth
2016-08-29 22:14:27
1406
原创 笔记--PHP 函数之mt_rand( 33, 126)&chr()
randpwd.php <?php function create_password($pw_length = 8) { $randpwd = ''; for ($i = 0; $i < $pw_length; $i++) { $randpwd.=chr(mt_rand(33,126)); } return $randpwd; } echo create_password();
2016-08-29 19:41:47
1137
原创 笔记--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
原创 笔记--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
原创 笔记--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
原创 笔记--ThinkPHP模板文件
1.在APP/tpl下建立Action同名的文件夹 然后建立模板文件,如:index.html 2.在哪IndextAction.class.php中调用模板: $this->display(); 或$this->display('test');
2016-08-23 14:21:05
428
原创 笔记--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
原创 笔记--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
原创 笔记--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
原创 笔记--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
原创 笔记--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
原创 Pinax 中常用到的模板标签。
1. {% extends "banner_base.html "%} 2. {% load i18n %} 3. {}
2014-11-11 15:42:08
449
原创 Pinax 代码分析(一)
comprehensive account management functionality. It is a foundation 27 suitable for most sites that have user accounts. 28 {% endblocktrans %} 29 30 31 {% if user.is
2014-11-10 15:15:50
1200
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅