Question: Please write a test.php file.. Task There are a variety of provided files below. The file called week06-image.php was code done in the Week 6
Please write a test.php file..
Task There are a variety of provided files below. The file called week06-image.php was code done in the Week 6 lecture --which you can look at to do this assignment (it will help!). 1. Start by downloading each of the provided files and place them in to an empty directory on myweb.cs.uwindsor.ca. 2. Load page.html in your web browser from myweb.cs.uwindsor.ca. (It will have a default appearance but no images will load, the button won't do anything and the heading will not appear white on a green background. Your task for this assignment is to write smart.php that will process HTTP GET requests as follows (as is reflected in the page.html code): O smart.php?what=1 will trigger the downloading of alpha.png (using a MIME type of image/png) smart.php?what=2 will trigger the downloading of sample.css (using a MIME type of text/css) smart.php?what=3 will trigger the downloading of sample.js (using a MIME type of text/javascript) anything else passed to smart.php must trigger a valid HTTP 404 (File Not Found) response with HTML sent back explaining the error. You are not allowed to modify any of the provided files. (Keep things simple: this assignment is intentionally straight-forward.) NOTE: Remember to always properly set the MIME type in your PHP code! Task There are a variety of provided files below. The file called week06-image.php was code done in the Week 6 lecture --which you can look at to do this assignment (it will help!). 1. Start by downloading each of the provided files and place them in to an empty directory on myweb.cs.uwindsor.ca. 2. Load page.html in your web browser from myweb.cs.uwindsor.ca. (It will have a default appearance but no images will load, the button won't do anything and the heading will not appear white on a green background. Your task for this assignment is to write smart.php that will process HTTP GET requests as follows (as is reflected in the page.html code): O smart.php?what=1 will trigger the downloading of alpha.png (using a MIME type of image/png) smart.php?what=2 will trigger the downloading of sample.css (using a MIME type of text/css) smart.php?what=3 will trigger the downloading of sample.js (using a MIME type of text/javascript) anything else passed to smart.php must trigger a valid HTTP 404 (File Not Found) response with HTML sent back explaining the error. You are not allowed to modify any of the provided files. (Keep things simple: this assignment is intentionally straight-forward.) NOTE: Remember to always properly set the MIME type in your PHP code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
