Re: [SMARTY] install issue
| From: | Bill Angus | Date: | Sat, 17 May 2003 21:03:55 +0000 |
| Subject: | Re: [SMARTY] install issue | ||
| References: | 1 2 3 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9571@lists.php.net to get a copy of this message | ||
oops I was totally wrong.
The thing compiles with the "file." addition suggested by Messju. It runs without throwing
an error -- but no output of the contents of the template happens. A problem with the former files
was that I had a template index.tp1 (tp-one) instead of index tpl (tp-ell)
Currently, the processing of template file seems to work fine up to a point -- at least I traced it
through ok with the debugger. The template file gets parsed but only a TRUE gets returned after the
template is processed, instead of the actual display of the template file taking place.
-----------------
//here is current .php file configuration
<?PHP
define('SMARTY_DIR','C:\\PHP\\Smarty\\libs\\');
define('Project_DIR','E:\\Tester\\');
require(SMARTY_DIR.'Smarty.class.php');
$smarty = new Smarty;
$smarty->template_dir =Project_DIR.'templates\\';
$smarty->compile_dir = Project_DIR.'templates_c\\';
$smarty->config_dir = Project_DIR.'configs\\';
$smarty->cache_dir = Project_DIR.'cache\\';
$smarty->assign('name','BillAngus');
$smarty->display('file:'.$smarty->template_dir.'index.tpl');
?>
---------------------------
// here is the file index.tpl.php which comes out of the process
<?php /* Smarty version 2.5.0, created on 2003-05-17 12:34:27
compiled from file:E:\Tester\templates\index.tpl */ ?>
----------------------------
// here is the index.tpl file
{* Smarty *}
Hello, {$name}!