私人领地

随笔分类 -  Thinkphp

摘要:结构代码 概述: 1.首先,读写方式打开或者创建文件lock.txt文件 2.给lock.txt文件上 "独占锁",上锁成功后就可以进行下一步"处理订单商品数据了" 3.处理完数据后,要"释放锁”,以及fclose关闭打开的文件 注意:给文件“独占锁”后,如果再没有里面的“释放锁”,就没有下一个"轮 阅读全文
posted @ 2017-04-06 11:06 狂奔的蜗牛Snails 阅读(2077) 评论(0) 推荐(0) 编辑
摘要:this>assing(result.result)html页面代码{vo['username']}{$vo['time']|date='Y-m-d H:i:s',###} //这里的### 相当{$vo['time']}与v){}?>{$vo['username']} 阅读全文
posted @ 2015-11-08 13:44 狂奔的蜗牛Snails 阅读(203) 评论(0) 推荐(0) 编辑
摘要:111 阅读全文
posted @ 2015-11-08 13:41 狂奔的蜗牛Snails 阅读(89) 评论(0) 推荐(0) 编辑
摘要:public function index(){ result=M(content)>select()this->assig('result',result);this->display()}简化public function index(){ $this->assig... 阅读全文
posted @ 2015-11-08 13:39 狂奔的蜗牛Snails 阅读(137) 评论(0) 推荐(0) 编辑
摘要:result=M(content)>where(id>0)>deleteresult =M('content')->where(array('id'=>array('gt',0)))->delete这两个效果一样,删除id>0的记录 阅读全文
posted @ 2015-11-08 13:31 狂奔的蜗牛Snails 阅读(161) 评论(0) 推荐(0) 编辑
摘要:m=M(content);//m = new Model('content')效果一样$date = array( 'username' => I('username','','htmlspecialchars'); 'content' => I('content','',... 阅读全文
posted @ 2015-11-08 13:23 狂奔的蜗牛Snails 阅读(148) 评论(0) 推荐(0) 编辑
摘要:如果在上面表单中 ,填写 输出结果(echo get[name])111(echoI"name")111echoI(name,,htmlspecialchar):echothis->_GET('name'): 出现弹窗是因为没有进行实例化解... 阅读全文
posted @ 2015-11-08 12:54 狂奔的蜗牛Snails 阅读(520) 评论(0) 推荐(0) 编辑
摘要:php文件输出U() 跳转地址,echo U('Index/index',array('uid'=>1,'username'=>'wang','time'=>165465121))相当于 index.php?m=Index&a=index&uid=1&username=wang&time=1654... 阅读全文
posted @ 2015-11-08 12:29 狂奔的蜗牛Snails 阅读(332) 评论(0) 推荐(0) 编辑
摘要:1.public function index(){ $this->display()}// 默认输出的是index.html模板2.public function index(){ $this->display('select')}输出的是select.html模板;如果是select.htm... 阅读全文
posted @ 2015-11-08 12:17 狂奔的蜗牛Snails 阅读(1538) 评论(0) 推荐(0) 编辑
摘要:ConterReplaceBehavior.class.php查找__PUBLIC__protected function templateContentReplace($content) { // 系统默认的特殊变量替换 $replace = array( ... 阅读全文
posted @ 2015-11-08 12:00 狂奔的蜗牛Snails 阅读(191) 评论(0) 推荐(0) 编辑
摘要:1.在Common目录下创建Common.php(系统会自动加载Common.php)代码:function say(){echo '0000'; }在IndecAction.php输出public function show(){ print_r(say()); }如果在... 阅读全文
posted @ 2015-11-08 11:40 狂奔的蜗牛Snails 阅读(308) 评论(0) 推荐(0) 编辑
摘要:要求:前台,后台;只需要配置一个config.php 其他文件共享默认配置是Index/Conf/config.phpAdmin/Conf/config.php代码:return array( DB_HOST' => '127.0.0.1', // 服务器地址 ... 阅读全文
posted @ 2015-11-08 11:34 狂奔的蜗牛Snails 阅读(266) 评论(0) 推荐(0) 编辑
摘要:版本:3.1.1连接数据库的具体位置 thinkphp/Config/convention.php,默认修改数据库在这里就可以了但是为了方便,把数据库配置写到Index/Conf/config.php 写到这里最佳(如果config.php里面已经有了配置,系统就会默认提取config.php参数而... 阅读全文
posted @ 2015-11-08 11:07 狂奔的蜗牛Snails 阅读(203) 评论(0) 推荐(0) 编辑
摘要:1.load('@.function') 临时性加载指的是Common文件下的 function如 function select(){} , locad中的function实际指的就是 common目录下的select.php文件用法:class IndexAction extends Actio... 阅读全文
posted @ 2015-11-08 10:00 狂奔的蜗牛Snails 阅读(237) 评论(0) 推荐(0) 编辑
摘要:基础版: 只有thinkphp基础运行功能完整版:基础运行能力,还有图片、上传等各种处理类(建议下载完整版)重要的三个变量define('APP_DEBUG',True);// 定义应用目录define('APP_NAME','Index/');define('APP_PATH','./php/')... 阅读全文
posted @ 2015-11-07 10:06 狂奔的蜗牛Snails 阅读(586) 评论(0) 推荐(0) 编辑
摘要:Thinkphp 语言包丢失 造成的原因有那些1.复制模板 预览时内容出现英文状态 如:show.html解决:找到lang ,在zh-cn 复制想对应的文件包 改下名称就有可以 如:admin_orderl.php 阅读全文
posted @ 2013-06-18 14:48 狂奔的蜗牛Snails 阅读(252) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示