PHP code example of tyler / mira
1. Go to this page and download the library: Download tyler/mira 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/ */
tyler / mira example snippets
// assumes a __DIR__/path/to/dir/view.phtml file exists
$mira = new Mira\Engine(__DIR__ . '/path/to/views');
// title will be injected as variable $title
$page = $mira->render('view', ['title' => 'title']);
// Display content however you want
echo $page;
<div>
// render a section in the view
$this->insert("section");
<div>
echo $this->e($title);