How can we upload a file in php?



How can we upload a file in php?..

Answer / Prabhanjan Kumar

{"upload": "In PHP, you can upload files using the $_FILES superglobal array and the 'move_uploaded_file' function. Here's an example: if (isset($_FILES['file'])) { move_uploaded_file($_FILES['file']['tmp_name'], 'filename'); }"}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

display selected value in dropdown list through javascript without page refresh

1 Answers  


Who is the father of PHP and explain the changes in PHP versions?

15 Answers   ADISoft Tech, Genpact, PropTiger, TWA,


Which php framework is in demand?

1 Answers  


What is the use of mvc in php?

1 Answers  


What is array and function?

1 Answers  


Explain mysql_errno()?

1 Answers  


what is session_set_save_handler in PHP?

1 Answers  


What is foreach loop in php?

1 Answers  


How is a constant defined in a PHP script?

1 Answers  


How to genrate report in wordpress cms

1 Answers  


Is set in php?

1 Answers  


What is php and why we use it?

1 Answers  


Categories