ab 5 : PHP2 part 1 statement
- Create a directory called “rollno-lab5-part1” where “rollno” is your roll number.
- Keep all your scripts, html pages and all relevant files in this directory
- Use following command to create a tar ball :tar -czvvf rollno-lab5-part1.tgz rollno-lab5-part1/
(Note that you have to outside this directory to run this command).
- Upload this tarball “rollno-lab5-part1.tgz” on moodle.
- Do not change cases, and do not deviate from the naming scheme for yourscripts, directory or tar file to be uploaded.
1. WORD FREQUENCY COUNTER:
- Take a text file as input, using file input in HTML on index.php
- Validate that the taken input file is with extension .txt; if it does not have .txt extension, show an error message and redirect it to upload the file again.
- In php, check if (file size less than 2KB), display error otherwise.
- The text file has to be processed to produce the frequency count of (number of occurrences) of each word sorted in alphabetical order as a HTML table
- Frequency count must be case-insensitive (e.g. both ’Hey’ and ’hey’ would be counted under the same word ’hey’)1




