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
How to get no of arguments passed to a PHP Function?
What is meant by urlencode and urldecode?
What are the encryption functions in php?
If the variable $var1 is set to 10 and the $var2 is set to the character var1, what's the value of $$var2?
Which is the best php framework for a beginner?
What is the main difference between php 4 and php 5?
List types of array are available in php?
Where are cookies stored php?
How to pad an array with the same value multiple times?
How to read the entire file into a single string?
Explain the ternary conditional operator in php?
What is the difference between myisam and innodb?
What is the use of rand() in php?
What is member function?
Which functions are used to remove whitespaces from the string?