Что ему мешает редактировать wp-config.php?
if (условие) {
require_once __DIR__ . '\popup.php';
}
$this->render('path/to/file', ['model' => $model]);
Сейчас же я вижу выход только убирать тег form у поиска
andWhere( 'date >= 2018-04-01 00:00:00 AND date <= 2018-08-01 23:59:59')
<code lang="php">
andWhere(['>=', 'date', strtotime('2018-04-01 00:00:00')])->andWhere(['<=', 'date', strtotime('2018-08-01 23:59:59')]);
</code>
public function getGoods()
{
return $this->hasMany(Googs::class, ['id_shop' => 'id']);
}
public function getShop()
{
return $this->hasOne(Shop::class, ['id' => 'id_shop']);
}
[
'attribute' => 'id_shop',
'value'=> 'shop.name'
],
"SELECT * FROM my_links WHERE keyword = '".$key."' AND search = 'google' AND urlmd5 = '".$link2."'";
$arr1 = [ 0=>'Петя', 1=>'Коля', 2=>'Вася' ];
$arr2 = [ 0=>'100руб', 1=>'200руб', 2=>'300руб' ];
$arr3 = [ 0=>'Москва', 1=>'Тверь', 2=>'Уфа' ];
function func($a, $b, $c){
return [$a, $b, $c];
}
$result = array_map('func', $arr1, $arr2, $arr3);
print_r($result);
protected function afterSave(){
parent::afterSave();
if($this->isNewRecord){
$model = Products::findOne($this->id);
$model->image = UploadedFile::getInstance($model, 'image');
if($model->image){
$model->upload();
}
}
}
return $this->renderAjax('path/to/file', ['model' => $model])
В БД в таблице users есть столбец status хочу что бы доступ к разделу админов имели только юзеры с статусом 3,4,5 но не совсем понимаю как это реализовать.
<?= $form->field($model, 'clickwrap', [
'template' => "<div class=\"check\">{input}{label}</div>\n<div class=\"col-lg-8\">{error}</div>"
])->checkbox([],false)
?>
return $this->redirect('site/signup-step-two');
return $this->renderAjax('signup-step-two', [
'model' => $model,
]);
$user = $model->save()
? $model->id_sec = Yii::$app->request->post("News")["id_sec"];
$model->is_show = Yii::$app->request->post("News")["is_show"];
[['id_sec', 'is_show'], 'integer']
['multiplier','integer'],
$model->created_at = time();
$model->count_show = 0;
$model->count_clicks = 0;
$model->is_news = 1;
public function behaviors()
{
return [
TimestampBehavior::className()
];
}
$model->created_at = time();
['cout_show', 'count_click'], 'default', 'value' => 0]
RewriteEngine On
RewriteCond %{REQUEST_URI} /index\.php\ HTTP/
RewriteRule ^index\.php$ http://%{HTTP_HOST}/ [R=301,L]