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 select a database in php?
Is php 5.6 secure?
What is php and sql?
What are the methods to submit form in php?
Do csrf tokens expire?
What is mvc in php?
How to read one character from a file?
How can we determine whether a php variable is an instantiated object of a certain class?
Define object-oriented methodology?
How can we change the maximum size of the files to be uploaded?
In how many ways we can retrieve the data in the result set of mysql using php?
What is mysqli php?
What is the use of return in php?
Which php framework is best for security?
How to retrieve values out of an array?