Demo: set_rootdir, set new root/theme directory

Welcome to Demo: set_rootdir, set new root/theme directory

Viewing in Plain theme.


The End
Switch theme

include_once( 'includes/pTemplate.php' );

$pTemplate->set_rootdir('templates/plain/');

// now root is 'templates/plain/'
$pTemplate->add_file( 'set_rootdir.html' );
$pContent = $pTemplate->pparse_file( 'set_rootdir.html' );
echo $pTemplate->pparse($pContent);
exit;

Other demos

View Online Documentation