PHP code example of phpieces / framework

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

    

phpieces / framework example snippets

 php
onfig = [
    'template_dir' => 'template/folder'
];

$app = new App($config);

$app->get('/', function(ServerRequestInterface $request, ResponseInterface $response) {
    $response->getBody()->write($this->templates->render('home'));

    return $response;
});

$app->run();