![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Yii2.0
文章平均质量分 68
大爱无疆强
这个作者很懒,什么都没留下…
展开
-
yii2.0 事务
$transaction=\Yii::$app->db->beginTransaction(); $model=Customer::findOne(1); $model->name='洋'; $model->save(false); $model->update(['age'=>5]); if(!$model->save(false)){ $transaction-转载 2014-11-13 15:28:35 · 1385 阅读 · 0 评论 -
在Yii2.0中实现规划任务(cron)
Create console application 创建号令行应用 In advance template there is already a file yii. And there is no need to run it as php, it is Linux script. 在高等模版中的 yii 文件,它是一个 Linux 脚本,不须要应用PHP来运行。 Creat转载 2014-11-15 00:01:10 · 2432 阅读 · 0 评论 -
yii 2.0 写入日志
做微信接口,没有返回数据,但查看错日志,也没有记录到错误日志,于是想记录 trace 日志 首先,我们的 web.php 配置文件中,更改于下 log' => [ 'traceLevel' => YII_DEBUG ? 3 : 0, 'targets' => [ [转载 2015-04-23 01:33:04 · 1765 阅读 · 0 评论