Home > PHP & Programming > Quizzes > PHP Programming Basics Practice Test: Image Uploading With PHP
PHP Programming Basics Practice Test: Image Uploading With PHP
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 0% Most missed: “You use the $_SERVER superglobal and your _______ property to create your path t…”
To upload an image with PHP, you can: Create an HTML form with an action attribute that points to the PHP file that will handle the image upload Create a PHP file called upload.php in the same directory as the form Create a directory called images in the same directory as the form Validate the file type size before uploading to the server Call the PHP upload function to save the file to the target Display the uploaded image on the browser  Here are some tips for uploading images with PHP: Make sure the file is an image Make sure the file is smaller than 5MB Make sure the file has a... Show more
PHP Programming Basics Practice Test: Image Uploading With PHP
Time left 00:00
10 Questions

1. To process the file, you need to break the array from $_FILES into individual values. You can do this using the ________ function.
2. To make the ImageHandler class portable you should create a separate file for it called __________
3. When you’re uploading files you need to set the enctype of the form to __________
4. DocBlocks are indicated by opening a comment using _________
5. Which one of the following is true about the following line – $obj = new ImageHandler(‘/images/’, array(400, 300));?
6. You use the $_SERVER superglobal and your _______ property to create your path to check.
7. Before you try to process the file, you need to make sure that your $err value is equivalent to _________
8. You use the $_SERVER superglobal and your _______ property to create your path to check.
9. Before you can start processing images with PHP, you must first add the ability to upload images to your administrative form on ________
10. Which function do you have to use to check whether the $path you’ve stored exists?