I want to uploade a file. I have all the needed data for moving my file from the temp folder but it's not working.
Code:
$filename = $_FILES[$id.'upload']['name'];
$dir = $config['uploads_path'] . '/' . $filename;
I hope you can help me

Thx
Maybe:MoFu wrote: I want to uploade a file. I have all the needed data for moving my file from the temp folder but it's not working.
Code:
$filename = $_FILES[$id.'upload']['name'];
$dir = $config['uploads_path'] . '/' . $filename;
I hope you can help me![]()
Code: Select all
if( (isset($_FILES[$id.'upload'])) && (is_uploaded_file($_FILES[$id.'upload']['tmp_name'])) )
{
global $gCms;
$filepath = $gCms->config['uploads_path'] .DIRECTORY_SEPARATOR. $_FILES[$id.'upload']['name'];
cms_move_uploaded_file($_FILES[$id.'upload']['tmp_name'], $filepath);
}