Answer the question
In order to leave comments, you need to log in
Working with Yii files Where is the mistake?
Good afternoon. You need to access the file in the application. To do this, I need to upload it through the form. Created a form according to one of the guides on the official YiiFramework website.
Model
public $imageFile;
public function rules()
{
return [
);
$form->field($file, 'imageFile')->fileInput();
ActiveForm::end();
Call to a member function formName() on a non-object
Answer the question
In order to leave comments, you need to log in
$form->field($file, 'imageFile')->fileInput();
$file - exactly the yii\base\Model instance in the view?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question