FileHelper::createDirectory($fullPath);
public function beforeSave($insert)
{
if (parent::beforeSave($insert)) {
$this->text = self::purifier($this->text);
return true;
} else {
return false;
}
}
public static function purifier($text)
{
$pr = new HtmlPurifier;
return $pr->process($text);
}
strip_tags() не помогает
<?php $model->LastName = strip_tags($model->LastName); ?>
<?= $form->field($model, 'LastName')->textInput(); ?>
yii\web\UploadedFile::getInstance()
yii\web\UploadedFile::getInstances()
<?= $form->field($model, 'myAttribute[]')->fileInput();?>
<?= $form->field($model, 'myAttribute[]')->fileInput();?>
<?= $form->field($model, 'myAttribute[]')->fileInput();?>
<?= $form->field($model, 'myAttribute[]')->fileInput();?>
<?= $form->field($model, 'myAttribute[]')->fileInput();?>
<?= $form->field($model, 'myAttribute[]')->fileInput();?>