Chris Pollett > Students >
Ajita

    ( Print View)

    [Bio]

    [Blog]

    [C297 Proposal]

    [Deliverable 1]

    [Deliverable 2]

    [Deliverable 3]

    [Deliverable 4]

    [Presentation 1 - PDF]

    [Presentation 2 - PDF]

    [Presentation 3 - PDF]

    [Final Report 297 - PDF]

    [C298 Proposal]

Deliverable 1 - Webpage Routing

Deliverable 1 - Implement Routing with Atto Server

Description: Implement routes using the existing web server to get a picture of how the web server is working. The routes display web pages stored on the server using the routes coded into index.php .

Step-1: Creating index.php

Create an index.php file with the necessary code to set up routing.

Step-2: Run the Server

Navigate to the folder where index.php is saved and run the file using the command:

php index.php
terminal Screenshot

Notice: Server started and listening on port 8000 😊

Step-3: Open localhost port 8000 on the web browser

Visit http://localhost:8000 in your web browser to access the main page.

Main Page Screenshot

Code of Each Route

Bio Page Route


      $test->get('/bio', function() { ... });
    
Bio Page Screenshot

Blog Page Route


      $test->get('/blog', function() { ... });
    
Blog Page Screenshot

Proposal Page Route


      $test->get('/proposal', function() { ... });
    
Proposal Page Screenshot

Find the full code below:

myExamples.zip