PHP code example of baicaowei / own-php-framework

1. Go to this page and download the library: Download baicaowei/own-php-framework 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/ */

    

baicaowei / own-php-framework example snippets



ings = Baicaowei\App($settings);
->run();

 



return [
    'settings' => [
        'displayErrorDetails' => true,
        'addContentLengthHeader' => false,
    ],
];



$app->get('/test/{id}', Baicaowei\Controller\AuthController::class . ':show');



$container = $app->getContainer();
$container['db'] = function ($c) {
    $db = new Medoo\medoo([
    'database_type' => 'mysql',
    'database_name' => '',
    'server' => '',
    'username' => '',
    'password' => '',
    'charset' => 'utf8mb4',
    ]);
    return $db;
};
composer
composer