PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of António Lourenço   Lou Router   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Example
Class: Lou Router
Route HTTP requests using callback functions
Author: By
Last change:
Date: 1 month ago
Size: 749 bytes
 

Contents

Class file image Download
<?php
   
require_once 'router.php';
    require_once
'routes.php'; // Include routes.php to define the functions
   
$router->run(); // Run the router here
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Teste de Rotas</title>
</head>
<body>
    <div>
        <ul>
            <li><a href="/rotas/home">HOME</a></li>
            <li><a href="/rotas/about">ABOUT US</a></li>
            <li><a href="/rotas/contact">CONTACT US</a></li>
        </ul>
    </div>
    <div id="content">
        <?php
           
if (!isset($content)) {
               
$content = '';
            }
            echo
$content;
       
?>
</div>
</body>
</html>