Jump to content

upload help


galleeandfarel

Recommended Posts

my design code is

<form action="upload.php" method="post" enctype="multipart/form-data">

File: <input type="file" name="filename" />

<input type="submit" value="Upload" />

</form>

 

php code is

 

<?php

$folder = "C:\wamp\www\vgotjobs\upload";

if (is_uploaded_file($HTTP_POST_FILES['filename']['tmp_name'])) {

if (move_uploaded_file($HTTP_POST_FILES['filename']['tmp_name'],$folder.$HTTP_POST_FILES['filename']['name'])) {

Echo "File uploaded";

} else {

Echo "File not moved to destination folder. Check permissions";

};

} else {

Echo "File is not uploaded.";

};

?>

 

 

 

above are my upload php codes,

when i run in the localhost,it tells

"FILE IS NOT UPLODED"

plz give me a hint to upload files in my temp folder......

Link to comment
https://forums.phpfreaks.com/topic/114227-upload-help/
Share on other sites

<?php
$folder = "C:/wamp/www/vgotjobs/upload/";
if(is_uploaded_file($_FILES['filename']['tmp_name'])) {
if(move_uploaded_file($_FILES['filename']['tmp_name'], $folder.$_FILES['filename']['name'])) {
	Echo "File uploaded";
} else {
	Echo "File not moved to destination folder. Check permissions";
}
} else {
Echo "File is not uploaded.";
}
?>

Link to comment
https://forums.phpfreaks.com/topic/114227-upload-help/#findComment-587366
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.