

MCQOPTIONS
Saved Bookmarks
This section includes 17 Mcqs, each offering curated multiple-choice questions to sharpen your Php knowledge and support exam preparation. Choose a topic below to get started.
1. |
DocBlocks are indicated by opening a comment using _________. |
A. | /*/ |
B. | /** |
C. | %2A |
D. | /* |
E. | None of these |
Answer» C. %2A | |
2. |
To make the ImageHandler class portable you should create a separate file for it called __________. |
A. | handler.inc.php |
B. | imghandler.inc.php |
C. | images.inc.php |
D. | imagehandler.inc.php |
E. | None of these |
Answer» D. imagehandler.inc.php | |
3. |
When you re uploading files you need to set the enctype of the form to __________. |
A. | multipart/form-data |
B. | multimedia/form-data |
C. | text/file |
D. | text |
E. | None of these |
Answer» B. multimedia/form-data | |
4. |
Before you can start processing images with PHP, you must first add the ability to upload images to your administrative form on ________. |
A. | function.inc.php |
B. | admin.php |
C. | .htaccess |
D. | index.php |
E. | None of these |
Answer» C. .htaccess | |
5. |
Which one of the following is true about the following line $obj = new ImageHandler( /images/ , array(600, 400)); |
A. | This snippet sets the maximum dimensions allowed to 400 pixels wide by 600 pixels high |
B. | This snippet sets the minimum dimensions allowed to 600 pixels wide by 400 pixels high |
C. | This snippet sets the minimum dimensions allowed to 400 pixels wide by 600 pixels high |
D. | This snippet sets the maximum dimensions allowed to 600 pixels wide by 400 pixels high |
E. | None of these |
Answer» E. None of these | |
6. |
Which function do you have to use to check whether the $path you ve stored exists? |
A. | is_dir() |
B. | path_dir() |
C. | path_dir() |
D. | path() |
E. | None of these |
Answer» B. path_dir() | |
7. |
Before you try to process the file, you need to make sure that your $err value is equivalent to _________. |
A. | UPLOAD_ERR |
B. | UPLOAD_ERR_NO_OK |
C. | UPLOAD_NO_ERR |
D. | UPLOAD_ERR_OK |
E. | None of these |
Answer» E. None of these | |
8. |
([ w-]+) will match ___________. |
A. | one or more word characters and/or hyphens |
B. | one or more word characters and hyphens |
C. | one word characters |
D. | one or more word characters |
E. | None of these |
Answer» B. one or more word characters and hyphens | |
9. |
The (|/) tells the server to match ___________. |
A. | forward slash |
B. | either nothing or a forward slash |
C. | nothing |
D. | backward slash |
E. | None of these |
Answer» C. nothing | |
10. |
The URLs in the administrative links won t mean anything to admin.php unless you modify _________. |
A. | .urlaccess |
B. | .htmlaccess |
C. | .adminaccess |
D. | .htaccess |
E. | None of these |
Answer» E. None of these | |
11. |
Once your application can generate administrative links, you need to load those links into _________. |
A. | start.php |
B. | php.ini |
C. | index.ini |
D. | index.php |
E. | None of these |
Answer» E. None of these | |
12. |
When you are building administrative links you ll need to accept two arguments, which of the following are they? |
A. | URL of previous entry and previous page |
B. | URL of previous entry and URL of the entry you are working with |
C. | The current page and URL of the entry you are working with |
D. | The current page and previous page |
E. | None of these |
Answer» D. The current page and previous page | |
13. |
When a user confirms that he wishes to delete an entry, that entry s URL is passed to a function which removes the entry from the __________. |
A. | database |
B. | index.php |
C. | admin.php |
D. | function.inc.php |
E. | None of these |
Answer» B. index.php | |
14. |
Your confirmation form submits your choice, via the _______ method, to ________. |
A. | GET admin.php |
B. | POST index.php |
C. | POST admin.php |
D. | GET index.php |
E. | None of these |
Answer» D. GET index.php | |
15. |
To declare the function to confirm the deletion you need to add the code to __________. |
A. | functions.include.php |
B. | include.php |
C. | inc.php |
D. | functions.inc.php |
E. | None of these |
Answer» E. None of these | |
16. |
To identify entries marked for deletion, you check whether $_GET[ page ] == delete inside __________. |
A. | admin.php |
B. | .htaccess |
C. | index.ini |
D. | index.php |
E. | None of these |
Answer» B. .htaccess | |
17. |
You need to check whether ______ is set, to determine whether you re editing an entry or creating a new one. |
A. | $_SET[ admin ]. |
B. | $_GET[ admin ]. |
C. | $_SET[ url ]. |
D. | $_GET[ url ]. |
E. | None of these |
Answer» E. None of these | |