开发者

how to upload image in joomla admin componenet?

开发者 https://www.devze.com 2023-03-19 19:40 出处:网络
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 compo

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

精彩评论

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