i have follow the instruction upload file using a model but the image didn’t save inside the protected/images folder even i already success save to database. i need to create the images folder by myself or it will automatic create the images folder after save. All helps is needed.
If you check CUploadedFile::saveAs function, you will find out that it use php move_uploaded_file function, which doesn’t create destination directory, so you have to create it manually.
thank for reply. Problem solved. But facing another problem. i put the display image code at create view or what? i now can save the image to directory but i can’t see the display image view or result. Pls help.
By default the protected folder denies all requests for web files through the use of a .htaccess. IMO you shouldn’t be uploading files into the protected folder anyway so I suggest moving where you’re saving them to.