[PHPTAL] PHPTAL shows blank page
Laurent Bedubourg
lbedubourg at motion-twin.com
Wed Aug 9 11:41:21 CEST 2006
Alex Höbart wrote:
> Hi Laurent,
>
> I tried this minimal example and the result is the same. There is still
> no output and no error message.
>
> This is the compiled template:
> <?php
> function tpl_1_1_7eac0a7ec83537763d3ba7671828d0989( $tpl, $ctx ) {
> /* Generated by PHPTAL from test.html */ ;
> ob_start() ;
> $glb = $tpl->getGlobalContext() ;
> $_result_ = ob_get_contents() ;
> ob_end_clean() ;
> return $_result_ ;
>
> }
>
> ?>
I tested PHP 5.1.4 and everything went just fine with the minimal example.
Judging from the generated code, it looks like PHPTAL is not able to
parse the content of test.html (no output directive there) or maybe
test.html is empty after upload ?
Can you put the following files on your shared host and then give us the
url so we can diagnose a little bit further ?
info.php:
<?php phpinfo(); ?>
test.php:
<?php
require_once 'PHPTAL.php';
try {
$t = new PHPTAL('test.html');
$t->prepare();
print_r($t);
echo "---\n";
readfile($t->getCodePath());
echo "---\n";
echo $t->execute();
}
catch (Exception $e){
echo "---\n";
echo $e->__toString();
}
?>
test.html:
<h1>My test file</h1>
Laurent
More information about the PHPTAL
mailing list