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
Which function is used to read a file removing the html and php tags in it upwork?
What is php trait?
What is the difference between require and include in php?
How to use http headers inside php?
What is the use of "ksort" in php?
Can I write php code in html file?
Which is better php or wordpress?
What is php and its uses?
How to increase the execution time of a PHP script?
How do you check if an arraylist is empty?
What is a namespace in php?
Is php session id unique?
Explain what does the unlink() function means?
What is final in php?
How is it possible to set an infinite execution time for php script?