Upload an image

Hi guys,

Still I’m new to Yii and need to know how can i upload an image in to a directory.And also need to keep the image path in database to get the image when a view file load.

   EG: imaging there is some goods category and i need to add images for each category and when a user view a category the image also need to be shown.

can someone tell me how to do this or please send a related link… :)

hi please check this article


I checked that too…it worked for me…But i couldn’t show the image in my view file…it only shows the file name…also the extension of the image file doesn’t appear in the file that saved in the directory…