记laravel5转thinkphp5的备忘

  • 在数据库的ActiveRecord对应的model中,TP5里面的关联(relation)一定不能定义成下划线的名字,view层使用的时候无法找到这个变量。

错误示例:{$model.abc_relation.name},正确示例:{$model.abcRelation.name}

 

修改Linux系统时间命令

date  -s “2015-5-8 19:48:00”

 

在测试一些功能的时候,或许会用到这个命令

现在Linux和Windows有条件都是用网络自动校时了。(逃

php 处理高精度计算函数

PHP 为任意精度数学计算提供了二进制计算器(Binary Calculator),它支持任意大小和精度的数字,以字符串形式描述

bcadd — 加法
bccomp — 比较
bcdiv — 相除
bcmod — 求余数
bcmul — 乘法
bcpow — 次方
bcpowmod — 先次方然后求余数
bcscale — 给所有函数设置小数位精度
bcsqrt — 求平方根
bcsub — 减法

涉及到钱的计算,还是以int存储,不容易出问题

PHPStorm激活码

77751S0VBA-eyJsaWNlbnNlSWQiOiI3Nzc1MVMwVkJBIiwibGljZW5zZWVOYW1lIjoi5b285bK4IHNvZnR3YXJlMiIsImFzc2lnbmVlTmFtZSI6IiIsImFzc2lnbmVlRW1haWwiOiIiLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IklJIiwicGFpZFVwVG8iOiIyMDE5LTAxLTA1In0seyJjb2RlIjoiUlMwIiwicGFpZFVwVG8iOiIyMDE5LTAxLTA1In0seyJjb2RlIjoiV1MiLCJwYWlkVXBUbyI6IjIwMTktMDEtMDUifSx7ImNvZGUiOiJSRCIsInBhaWRVcFRvIjoiMjAxOS0wMS0wNSJ9LHsiY29kZSI6IlJDIiwicGFpZFVwVG8iOiIyMDE5LTAxLTA1In0seyJjb2RlIjoiREMiLCJwYWlkVXBUbyI6IjIwMTktMDEtMDUifSx7ImNvZGUiOiJEQiIsInBhaWRVcFRvIjoiMjAxOS0wMS0wNSJ9LHsiY29kZSI6IlJNIiwicGFpZFVw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