ive been reading the smarty manual and trying it out but it wont work....
index.php
PHP Code:
<?php
// load Smarty library
require('Smarty.class.php');
$smarty = new Smarty;
$smarty->template_dir = 'localhost/kp/smarty/templates/';
$smarty->compile_dir = 'localhost/kp/smarty/templates_c/';
$smarty->config_dir = 'localhost/kp/smarty/configs/';
$smarty->cache_dir = 'localhost/kp/smarty/cache/';
$smarty->assign('name','Ned');
$smarty->display('index.tpl');
?>
index.tpl
PHP Code:
<html>
<head>
<title>hiya {$name}!</title>
</head>
<body>
{* Smarty *}
Hello, {$name}!
</body>
</html>
why wont it work :S it keeps saying "Warning: Smarty error: unable to read resource: "index.tpl" in c:\apachefriends\xampp\php\pear\Smarty.class.php on line 1088"
Last edited by -_darkranger_-; 06-25-2005 at 07:17 AM..
|