Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Newb Install HEEEELLLLLP

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
panhead
Smarty n00b


Joined: 23 Oct 2003
Posts: 2

PostPosted: Thu Oct 23, 2003 12:26 am    Post subject: Newb Install HEEEELLLLLP Reply with quote

ok, I'm totally new to smarty. I have followed the basic install directions to a 'T'. Here's what I'm workin with:

XP Pro
Apache 2.0.47
PHP 4.3.3

I've tested the server and PHP. Both are working fine. Now to smarty:

c:\php\includes (all smarty files here)

htdocs\smarty\guestbook - created cache, templates, templates_c, and configs directories under guestbook - index.php and index.tpl also reside here

content of index.php
****
define(’SMARTY_DIR’,’c:\php\includes\’);
require(SMARTY_DIR.’Smarty.class.php’);

$smarty = new Smarty;

$smarty->template_dir = ’C:\Program Files\Apache Group\Apache2\htdocs\smarty\guestbook\templates\’;
$smarty->compile_dir = ’C:\Program Files\Apache Group\Apache2\htdocs\smarty\guestbook\templates_c\’;
$smarty->config_dir = ’C:\Program Files\Apache Group\Apache2\htdocs\smarty\guestbook\configs\’;
$smarty->cache_dir = ’C:\Program Files\Apache Group\Apache2\htdocs\smarty\guestbook\cache\’;

$smarty->assign(’name’,’Ned’);
$smarty->display(’index.tpl’);


contents of index.tpl
****
{* Smarty *}
Hello, {$name}!

Now, when i load index.php into IE6, this is the output I get:

define(’SMARTY_DIR’,’c:\php\includes\’); require(SMARTY_DIR.’Smarty.class.php’); $smarty = new Smarty; $smarty->template_dir = ’C:\Program Files\Apache Group\Apache2\htdocs\smarty\guestbook\templates\’; $smarty->compile_dir = ’C:\Program Files\Apache Group\Apache2\htdocs\smarty\guestbook\templates_c\’; $smarty->config_dir = ’C:\Program Files\Apache Group\Apache2\htdocs\smarty\guestbook\configs\’; $smarty->cache_dir = ’C:\Program Files\Apache Group\Apache2\htdocs\smarty\guestbook\cache\’; $smarty->assign(’name’,’Ned’); $smarty->display(’index.tpl’);


Any ideas where I'm going wrong?

Thanks
Back to top
View user's profile Send private message Send e-mail
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Thu Oct 23, 2003 1:40 am    Post subject: Reply with quote

your php file needs to be:[php:1:cb89c1ac7e]<?php
// the file contents
?>[/php:1:cb89c1ac7e]

Contents outside of <?php ... ?> tags are ignored by PHP.

HTH
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP