DOCX

exercise

By Rick Rice,2014-09-30 11:26
11 views 0
exercise

Week 2 Word counting

    Write a two (or more) page web site which will display details of how often selected words appear in a

    text file read from the server.

    Submission page

    Use a form to submit the following details:

    ; Name of the text file

    ; Type of display ( optional), e.g. word map, count, pictogram

    ; Up to 10 words to search for

    Something like:

Display page

    Display an error if:

    ; The file does not exist

    ; There are less than 3 words

    ; Any of the words contain spaces

    Display a representation(s) of the count of the words:

    ; Table of numbers

    ; Pictogram

    ; Word map

    Something like:

Notes

    1. The example code in complex_form.php shows the type of form you will have to use

    2. One way to count the words is to use the string function call substr_count($data, $word).

    3. You could use the file_get_contents() to read the text from the file.

Report this document

For any questions or suggestions please email
cust-service@docsford.com