ini_set('session.gc_maxlifetime', 120960);
ini_set('session.cookie_lifetime', 120960);
ini_set('session.save_path', __DIR__.'/../sessions/');
$model = Indicator::model()->find();
'<region:\w+>/shop/<brend:\w+>' => 'shop/show'
public function actionShow($region, $brend){
//...
}
options.error = function(xhr, textStatus, errorThrown) {
var container = extractContainer("", xhr, options)
// Check redirect status code
var redirect = (xhr.status >= 301 && xhr.status <= 303)
// Do not fire pjax::error in case of redirect
var allowed = redirect || fire('pjax:error', [xhr, textStatus, errorThrown, options])
if (redirect || options.type == 'GET' && textStatus !== 'abort' && allowed) {
locationReplace(container.url)
}
}
// Internal: Hard replace current state with url.
//
// Work for around WebKit
// https://bugs.webkit.org/show_bug.cgi?id=93506
//
// Returns nothing.
function locationReplace(url) {
if(!pjax.options.history) return;
window.history.replaceState(null, "", pjax.state.url)
window.location.replace(url)
}
if(!Yii::$app->request->isPjax || !Yii::$app->request->isAjax)
return $this->redirect(['group/show','id' => $id ]);
OPTION field_weights=(name=10,full_description=1), max_matches=10000, ranker=expr('sum((4*lcs+2*(min_hit_pos==1)+exact_hit)*user_weight)*1000+bm25')
public function __construct($id,$module = null)
{
$this->to_page = app()->user->getState('to_page', app()->params['to_page']);
parent::__construct($id, $module);
}
server {
listen 127.0.0.1:80;
server_name portal www.portal;
root home/portal/public_html/web;
index index.php index.html;
log_not_found off;
charset utf-8;
access_log logs/portal-access.log main;
location ~ /\. {deny all;}
location / { if (!-e $request_filename) { rewrite ^(.*)$ /index.php; } }
location = /favicon.ico {
}
location = /robots.txt {
}
location ~ \.php$ {
if (!-e $document_root$document_uri){return 404;}
fastcgi_pass 127.0.0.1:9054;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
public function init()
{
parent::init();
$this->on(Controller::EVENT_AFTER_ACTION,[$this,'onAfterAction']);
$this->on(Controller::EVENT_BEFORE_ACTION,[$this,'onBeforeAction']);
}
public function onAfterAction()
{
print "onAfterAction ";
}
public function onBeforeAction()
{
print "onBeforeAction ";
}