thinkphp5 自动写入数据库 datetime
发表于|更新于|php
1 | protected $autoWriteTimestamp = 'datetime'; |
文章作者: developer
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 Dev!
相关推荐
2017-04-02
thinkphp5 phpstudy 显示 No input file specified 解决办法
这是由于运行模式导致的修改入口处的配置 12345678910111213<IfModule mod_rewrite.c> Options +FollowSymlinks -Multiviews RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f #apacheHanlder模式 #RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] #fastCGI模式 RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]</IfModule>
2017-01-02
ci laravel lumen slim symfony thinkphp thinkphp5 yii2 phalcon yaf php框架安装后裸跑速度对比
最近比较忙先这样用吧 都是用我的笔记本 Wamp2.5 php5.6 apache2.4.9下跑的环境一致 绝对速度可能没有参考价值,相对速度可以参考,装上换上一样的模板就跑 模板地址 http://www.iguojin.com/ 1<div class="keywords">WE PROVIDE H5 GAMES & WECHAT DEVELOPMENT</div> 跑三遍。。。CI还是很猛的。。我觉得小项目是时候从TP转到CI了 2017-09-06最新测试phalcon可能是小项目首选,原因主要是, 这个框架速度极快, 使用简单,基本上和thinkphp用起来一样方便,没有一些强制性和框架专属的东西,很人性化 他的文档我看了一下只有一个,比较详细,没有藏着掖着的东西,这点算是优于thinkphp和laravel 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354// y...
2017-03-23
thinkphp5 控制器 验证 汉字说明
验证规则中的汉字 123$this->validate($data,[ 'captcha|验证码'=>'require|captcha']); 这个汉字是出现错误时替换出错字段的,例如没有写“汉字”时,会提示’captcha不能为空’,写了“验证码”替换后,会提示“验证码不能为空”
2017-08-28
thinkphp5 tp5 子查询 join
123456$GLOBALS["queryid"] = $id;$res = Db::name("cfamily_post")->where("delete_time", 0)->where('id', 'in', function ($query){ $query->name("cfamily_category_post")->where('category_id', $GLOBALS["queryid"])->field('post_id');})->page($page, $listRows)->select(); 123456789$join = [ ["cfamily_category_post relation","post.id = relation.post_id"],];...
2017-03-20
thinkphp5 cookie删除失败的原因
thinkphp5.0.7cookie操作有点问题默认配置中cookie没有prefix前缀但是cookie(null),这种方法只能删除指定prefix的所以直接这么用没法清除
2018-01-24
thinkphp5 模型初始化 注意要点
参考文献https://www.kancloud.cn/manual/thinkphp5/177529 TP中模型初始化 使用initialize方法否则会导致无法正常使用模型的对象特性 例如读取后数据为空空数组
公告
This is my Blog