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
Is salary fixed or variable cost?
What are php libraries?
What is curl php?
What is php compared to html?
How does php strcmp work?
What is difference between session and cookies in php?
What is default session time in php?
What are the new features available in php 7?
What are the new features in php 7?
What is var_dump?
What is polymorphism?
Can we extend two classes in php?
What does odbc do in context with php?
Why framework is used in php?
Who is the father of php and what is the current version of php and mysql?