Skip to content
This repository was archived by the owner on Aug 26, 2022. It is now read-only.

Auto Rooter

Anhgelus edited this page Jun 13, 2021 · 3 revisions

Auto Root

Automatic Rooter

PHP 7.2 and latest

How to use the Auto Rooter

It's very easy !

Step 1 - Create the index.php :

Add Rooter.php in your class Folder

Create the index.php like that

use App\Rooter\Rooter;

$uri = (string)$_SERVER['REQUEST_URI'];

$rooter = new Rooter($uri); $rooter->setSiteName('SITE NAME HERE') $content = $rooter->root(); $pageTitle = $rooter->getPageTitle(); $desc = $rooter->getPageDesc();

require dirname(__DIR__) . DIRECTORY_SEPARATOR . 'elements/html.php';

Step 2 - Create your first page:

Create the elements folder at the root (not in the public folder)

Create the HTML Base page (html.php) with the html code (the header, the footer, the doctype...)

Create the Main page (home.php here)

Put your code in this page

Start a server with LAMP / WAMP / PHP Developement Server (php -S localhost:XXXX)

See your beautiful page

Clone this wiki locally