PHP code example of envms / osseus

1. Go to this page and download the library: Download envms/osseus library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

envms / osseus example snippets


// add necessary classes
use Envms\Osseus\Dev\Debug;
use Envms\Osseus\Parse\Uri;
use Envms\Osseus\Router\Route;
use Envms\Osseus\Server\Environment;

// set your environment
$environment = Environment::instance(Environment::DEVELOPMENT); // the current environment
$debug = Debug::instance(Environment::TESTING); // the maximum environment to show debug statements

// optional but recommended - parse the URI and route to the index controller
$uri = new Uri($_SERVER['REQUEST_URI']);
$router = new Route('TestApp');
$router->go($uri);