hi,
I am uploading files in localhost its working but i am trying to upload files to ftp but that time it shows some warning error
Warning: move_uploaded_file(resumes/ftp details.txt) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/earthlin/public_html/careers.php on line 28
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move ‘/tmp/phpIyZ241’ to ‘resumes/ftp details.txt’ in /home/earthlin/public_html/careers.php on line 28
can anyone help me
Thanks in advance
[code>]
<?PHP
$image_name = $_FILES[‘txtattach’][‘name’];
$target_path = “resumes/”;
$target_path1 = $target_path.$image_name;
if(is_uploaded_file($_FILES[‘txtattach’][‘tmp_name’]))
{
$userfile_type = $_FILES[‘txtattach’][‘type’];
if (move_uploaded_file($_FILES[‘txtattach’][‘tmp_name’], $target_path1)) {
echo “File uploaded successfully.”;
} else {
switch($_FILES[‘txtattach’][‘error’]) {
case 1 : echo “1The uploaded file exceeds the upload_max_filesize directive in php.ini.”;
break;
case 2 : echo “1The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.”;
break;
case 3 : echo “1The uploaded file was only partially uploaded.”;
break;
case 4 : echo “1No file was uploaded.”;
break;
case 6 : echo “1Missing a temporary folder.”;
break;
case 7 : echo “1Failed to write file to disk”;
break;
case 8 : echo “File upload stopped by extension”;
break;
}
}
}
?>
[/code]