Reply to problems with uploading files

Your name:

Reply:


Posted by Glenn Coyle on 09/25/06 19:46

Hi

I am having issues with trying to upload files to a directory on my
server. the first script is the form the second is the upload file, it
just doesnt identify the file path where it is being uploaded from.

Any ideas?

<form action="getFiles.php" method="get"><br>
Type (or select) Filename: <input type="file" name="uploadFile">
<input type="hidden" name="MAX_FILE_SIZE" value="25000" />
<input type="submit" value="Upload File">
</form>


getfiles.php
<?
$target_path = "../slices/";
$target_path = $target_path . basename( $_FILES['uploadFile']['name']);
echo $_FILES['uploadFile'];
if(move_uploaded_file($_FILES['uploadFile']['tmp_name'], $target_path)) {
echo "The file ". basename( $_FILES['uploadFile']['name']).
" has been uploaded";
} else{
echo "There was an error uploading the file, please try again!";
}
?>


I just cant see what is wrong. Please help.

Thanks

Glenn

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация