Sr. PHP Programmer Question:
Download Questions PDF

Write down the code for save an uploaded file in php?

Answer:

if ($_FILES["file"]["error"] == 0)
{
move_uploaded_file($_FILES["file"]["tmp_name"],
"upload/" . $_FILES["file"]["name"]);
echo "Stored in: " . "upload/" . $_FILES["file"]["name"];
}

Download Senior PHP Programmer Interview Questions And Answers PDF

Previous QuestionNext Question
How will you create a MySql database using PHP?How will you access the reference to same object within the object in PHP?