PHP code example of dioscouri / f3-lib

1. Go to this page and download the library: Download dioscouri/f3-lib 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/ */

    

dioscouri / f3-lib example snippets



//AUTOLOAD all your composer libraries now.
(@include_once (__dir__ . '/../vendor/autoload.php')) OR die("You need to run php composer.phar install for your application to run.");
//Require FatFree Base Library https://github.com/bcosca/fatfree
$app = Base::instance();
//Set the PATH so we can use it in our apps
$app->set('PATH_ROOT', __dir__ . '/../');
//This autoload loads everything in apps/* and 
$app->set('AUTOLOAD',  $app->get('PATH_ROOT') . 'apps/;');
//load the config files for enviroment
 their own apps in the Routes.php files
\Dsc\System::instance()->get('router')->registerRoutes();
// trigger the preflight event PreSite, PostSite etc
\Dsc\System::instance()->preflight();
//excute everything.
$app->run();