开发者

how to upload image in joomla admin componenet?

i have not found a suitable answer can anyone plese tell me the way to upload images and send mail through a mvc component in joomla what are the changes required in model view controller of the component

i have done building component for the admin backend using the following example

http://www.joomladevuser.com/tutorials/components/component-dev-partii

how can i implement image file upload through browse i开发者_如何转开发n the following example can anyone help me .


$src = $file ['tmp_name']; // source temp location

$dest = JPATH_COMPONENT . DS . "logo" . DS . $newfilename; // destination

JFile::upload ( $src, $dest ); // file upload function in joomla

$result = $model->updatePic ( $filename ); // update function has you require to update the filename in database .

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜