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
What is difference between put and post method in http?
Explain about require and include function?
What is "print" in php?
What is basename php?
Is php a low level language?
What does the expression exception::__tostring means?
How can you get the size of an image in PHP?
What is str_replace()?
Can php run on windows server?
Is php secure?
What is the difference between overloading and overriding in php?
What happens when submit button is clicked?
Explain setcookie() function in php?
What are default session time and path?
Tell me how to find the position of the first occurrence of a substring in a string?