references:joomla.framework:filesystem:jfile-uploadupload
Moves an uploaded file to a destination folder. Syntaxboolean upload ( $src, $dest )
ExamplesExample: This example copies the temporary file sent in the upload variable. Example $file = JRequest::getVar( 'upload', '', 'file', 'array' ); if (!JFile::upload($file['tmp_name'], $destDir.strtolower($file['name']))) { echo "Upload failed!"; } else { echo "Upload complete!"; } NOTE: This example is taken from the admin.media.php file in the /administrator/components/com_media directory. This example did not work on the machine on which it was tested. Discussion |


