-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
The error is "premature end of script headers".
The directory structure is this
/index.php
/rain/templates/main_templates <-- my templates live here
/rain/library/Rain/...
/performance/index.php
/index.php contains:
<?php
// namespace
use Rain\Tpl;
// include
include "rain/library/Rain/Tpl.php";
// conf
$config = array(
"base_url" => null,
"tpl_dir" => "rain/templates/main/",
"cache_dir" => "rain/cache/",
"debug" => false // set to false to improve the speed
);
Tpl::configure( $config );
// draw
$tpl = new Tpl;
$tpl->assign( $vars );
echo $tpl->draw( "index" );
/performance/index.php contains:
<?php
// namespace
use Rain\Tpl;
// include
include "../rain/library/Rain/Tpl.php";
// conf
$config = array(
"base_url" => "https://my.url",
"tpl_dir" => "../rain/templates/main/",
"cache_dir" => "../rain/cache/",
"debug" => true // set to false to improve the speed
);
Tpl::configure( $config );
// draw
$tpl = new Tpl;
$tpl->assign( $vars );
print_r($vars);
echo $tpl->draw( "performance" );
index.php works just fine. performance/index.php fails every time. In fact the point where it fails is on the draw method. Because if I comment out draw all the $vars will print properly.
Metadata
Metadata
Assignees
Labels
No labels