PHP File Upload


  1. Which function is used to determine whether a file was uploaded?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    is_uploaded_file()


  1. How many items are available in the $_FILES array?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    $_FILEs[‘userfile’][‘error’], $_FILEs[‘userfile’][‘name’], $_FILEs[‘userfile’][‘size’], $_FILEs[‘userfile’][‘tmp_name’], $_FILEs[‘userfile’][‘type’] are the five items in the array.



  1. Which superglobal stores a variety of information pertinent to a file uploaded to the server via a PHP script?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    $_FILEs Array


  1. If you want to temporarily store uploaded files in the /tmp/phpuploads/ directory, which one of the following statement will you use?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    upload_tmp_dir “/tmp/phpuploads/ directory”



  1. Which directive sets a maximum allowable amount of memory in megabytes that a script can allow?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    Its default value is 16M.