Closed charles1e62 closed 3 years ago
How to configure the views directory in a project with the following structure.
app - public index.php - src - lib - views home.htm bootstrap.php config.ini routes.php
Index.php
require '../src/bootstrap.php';
config.ini
[globals] DEBUG=3 UI=views/
bootstrap.php
$f3=require('lib/base.php'); $f3->set('DEBUG',3); if ((float)PCRE_VERSION<8.0) trigger_error('PCRE version is out of date'); // Load configuration $f3->config('config.ini'); require 'routes.php'; $f3->run();
routes.php
$f3->route('GET /', function($f3) { echo View::instance()->render('home.htm'); } );
Request works correctly but the view is not rendered.
How to configure the views directory in a project with the following structure.
Index.php
require '../src/bootstrap.php';
config.ini
bootstrap.php
routes.php
Request works correctly but the view is not rendered.