Answer the question
In order to leave comments, you need to log in
Why can't he see the path to the image?
I am using a form widget.
here is the code that does it
if(isset($_POST['submit'])){
if($_FILES['img_url']['error'] == 0){
move_uploaded_file($_FILES['img_url']['tmp_name'],
Yii::app()->request->baseUrl . 'images/upload/' . $_FILES['img_url']['name']);
}
}
You must fill in the "Path to the image" field.
Answer the question
In order to leave comments, you need to log in
probably because you do not fill in the MODEL field where the picture should be. on this piece of code, you only copy the image from temporary storage
offtopic: the MySQL tag is definitely in the subject of the question...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question