API16

JStream/upload

From Joomla! Documentation

This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Syntax

Defined in

libraries/joomla/filesystem/stream.php

Importing

jimport('joomla.filesystem.stream');

Source Body

function upload($src,$dest,$context=null,$use_prefix=true,$relative=false){if(is_uploaded_file($src)){// make sure its an uploaded filereturn$this->copy($src,$dest,$context,$use_prefix,$relative);}else{$this->setError(JText::_('Not an uploaded file!'));returnfalse;}}