•How to upload files using PHP?

Answer Posted / kapil dhiman

<?php

move_uploaded_file($_FILES['file']['tmp_name'],"images/".$_FILES['file']['name']);

?>
<form action="" method="post" enctype="multipart/form-data">
File<input type="file" name="file" /><input type="submit" name="sub" value="Upload" />
</form>

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which functions are used to remove whitespaces from the string?

607


Is php a mvc?

504


How to generate a character from an ascii value?

562


Tell me how to initiate a session in php?

542


Is laravel better than codeigniter?

540






What are the rules to declare a php variables?

512


why did u want to leave your past organisation?

1646


What are the options to transfer session ids?

579


Which parts of php are case sensitive?

484


Is polymorphism inherited?

519


What is boolean in php?

522


How can we enable error reporting in php?

465


What are the features of object-oriented programming in php?

497


What is the function to count elements in an array in PHP?

618


What do you mean range() in php?

591