Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


•How to upload files using PHP?

Answer Posted / sei thu htun

Here is example code:
On HTML:
<form enctype="multipart/form-data" action="uploader.php"
method="POST">
<input name="uploadedfile" type="file" />
<input type="submit" value="Upload File" />
</form>

On PHP Script:

$target_path="YOUR_TARGET_PATH_FOR_STORE_UPLOAD_FILE_ON_SERVER";

if(@move_uploaded_file($_FILES['uploadedfile']['tmp_name'],
$target_path)) {
echo "Success";
} else{
echo "Error";
}

Is This Answer Correct ?    13 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which function is used to read a file removing the html and php tags in it upwork?

918


What is php trait?

961


What is the difference between require and include in php?

1078


How to use http headers inside php?

1043


What is the use of "ksort" in php?

936


Can I write php code in html file?

983


Which is better php or wordpress?

942


What is php and its uses?

958


How to increase the execution time of a PHP script?

1031


How do you check if an arraylist is empty?

974


What is a namespace in php?

946


Is php session id unique?

974


Explain what does the unlink() function means?

1101


What is final in php?

1077


How is it possible to set an infinite execution time for php script?

956