yii2

yii2 - yii2 queue - save to db and log not working within curl job

人盡茶涼 提交于 2020-12-15 05:46:08
问题 I am using https://github.com/yiisoft/yii2-queue I have function in execute method in queue class like: $this->RegisterDomains($available,$registrar->end_point, $this->request_id,$model->user_id,$registrar->api_key); and the registerDomains function looks like this: public function RegisterDomains($available,$end_point,$request_id,$user_id,$api_key) { $model = CatchDomains::find()->where(['request_id'=>$request_id])->one(); $PathToLog = 'runtime/domaincatch'; if(!(is_array($available['domain'

yii2 composer安装依赖包

 ̄綄美尐妖づ 提交于 2020-12-06 18:19:40
yii2 的composer安装时需要一个插件: php composer.phar global require "fxp/composer-asset-plugin:1.0.0" 在windows下 如果你安装了composer这个程序 那么安装命令(cmd输入:) composer global require "fxp/composer-asset-plugin:1.0.0" 接着上面的命令,在win下痛苦就来了 各种错误好像跟ssl相关的 大家都知道https 国外的某些网站是被墙的(骂娘了要),去下载openDsn工具 在安装时打开他(小黄灯变绿在执行命令) 就可以安上此插件了 下载地址:http://www.yijile.com/log/105.html这篇博文示出的 (http://shared.opendns.com/dnscrypt/packages/windows-client/DNSCryptWin-v0.0.6.exe) 安装上插件后 yii默认的composer.json 需要某些修改: 可以参考这里:http://stackoverflow.com/questions/25882271/cannot-update-yii2-via-composer-bower-asset-jquery-could-not-be-found 然后基本就不那么痛苦了

Yii2 redirect to previous page

僤鯓⒐⒋嵵緔 提交于 2020-11-30 02:54:34
问题 Now My application is using gridview to list all information and it's also have pagination.when the user click on pagination number and then click on edit and then save. It redirect user to view page. What I want to do it to redirect user to previous page(url with pagination number). 回答1: You could use Yii::$app->request->referrer which returns the last page the user was on. Usage is straightforward: return $this->redirect(Yii::$app->request->referrer); You need also take into account that

Yii2 redirect to previous page

隐身守侯 提交于 2020-11-30 02:53:56
问题 Now My application is using gridview to list all information and it's also have pagination.when the user click on pagination number and then click on edit and then save. It redirect user to view page. What I want to do it to redirect user to previous page(url with pagination number). 回答1: You could use Yii::$app->request->referrer which returns the last page the user was on. Usage is straightforward: return $this->redirect(Yii::$app->request->referrer); You need also take into account that