0

索引.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>

当我加载 index.php 时,我看到一个没有错误的大空白屏幕。

4

1 回答 1

1
echo $m->render('sign_in', array('planet' => 'world'));
于 2013-01-31T20:41:26.993 回答