Question

index.php:

<!-- language: lang-php -->

require('v/Mustache/Autoloader.php');

Mustache_Autoloader::register();

$m = new Mustache_Engine(array(
    'loader' => new Mustache_Loader_FilesystemLoader(dirname(__FILE__) . '/v'),
));

// loads template from `v/sign_in.mustache` and renders it.
$m->render('sign_in', array('planet' => 'world'));

?>

v/sign_in.mustache:

<h1>Where in the {{planet}} is Carmen San Diego?</h1>

When I load index.php, I see a big blank screen with no errors.

Was it helpful?

Solution

echo $m->render('sign_in', array('planet' => 'world'));
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top