Sail E0 Webinar

MCQs

Total Questions : 70 | Page 6 of 7 pages
Question 51. Before you can start processing images with PHP, you must first add the ability to upload images to your administrative form on ________
  1.    .htaccess
  2.    function.inc.php
  3.    index.php
  4.    admin.php
 Discuss Question
Answer: Option D. -> admin.php
Question 52. When you’re uploading files you need to set the enctype of the form to __________
  1.    text
  2.    text/file
  3.    multipart/form-data
  4.    multimedia/form-data
 Discuss Question
Answer: Option C. -> multipart/form-data
Question 53. To check whether a file was uploaded, you look in the _______ superglobal array.
  1.    $_FILES
  2.    $_DOCS
  3.    $_DOCUMENTS
  4.    $_FOLDERS
 Discuss Question
Answer: Option A. -> $_FILES
Question 54. To make the ImageHandler class portable you should create a separate file for it called __________
  1.    imagehandler.inc.php
  2.    images.inc.php
  3.    handler.inc.php
  4.    imghandler.inc.php
 Discuss Question
Answer: Option B. -> images.inc.php
Question 55. DocBlocks are indicated by opening a comment using _________
  1.    /*
  2.    //*
  3.    /**
  4.    /*/
 Discuss Question
Answer: Option C. -> /**
Question 56. To process the file, you need to break the array from $_FILES into individual values. You can do this using the ________ function.
  1.    divide()
  2.    list()
  3.    break()
  4.    indi()
 Discuss Question
Answer: Option B. -> list()
Question 57. Before you try to process the file, you need to make sure that your $err value is equivalent to _________
  1.    UPLOAD_ERR_OK
  2.    UPLOAD_NO_ERR
  3.    UPLOAD_ERR_NO_OK
  4.    UPLOAD_ERR
 Discuss Question
Answer: Option A. -> UPLOAD_ERR_OK
Question 58. You use the $_SERVER superglobal and your _______ property to create your path to check.
  1.    $load_dir
  2.    $load
  3.    $save
  4.    $save_dir
 Discuss Question
Answer: Option D. -> $save_dir
Question 59. Which function do you have to use to check whether the $path you’ve stored exists?
  1.    path_dir()
  2.    path()
  3.    is_dir()
  4.    path_dir()
 Discuss Question
Answer: Option C. -> is_dir()
Question 60. Which one of the following is true about the following line – $obj = new ImageHandler(‘/images/’, array(400, 300));
  1.    This snippet sets the maximum dimensions allowed to 400 pixels wide by 300 pixels high
  2.    This snippet sets the minimum dimensions allowed to 300 pixels wide by 400 pixels high
  3.    This snippet sets the minimum dimensions allowed to 400 pixels wide by 300 pixels high
  4.    This snippet sets the maximum dimensions allowed to 300 pixels wide by 400 pixels high
 Discuss Question
Answer: Option A. -> This snippet sets the maximum dimensions allowed to 400 pixels wide by 300 pixels high

Latest Videos

Latest Test Papers