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

library files setup??

 
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 -> Installation and Setup
View previous topic :: View next topic  
Author Message
vickriz
Smarty Rookie


Joined: 27 May 2003
Posts: 16
Location: Philippines

PostPosted: Fri Mar 05, 2004 8:20 am    Post subject: library files setup?? Reply with quote

To smary guru..
im a newbie in linux. i read the manual of installation but i really hard to uunderstand where to put my smarty lib files and the Smarty directory. i dont know where to locate my include_path you where refering to. pls heelp me witth this regarding include_path and relative path.
heres my directory structure on linux:
placing my smarty lib file..[Smarty.class..,etc]
/usr/local/lib/php/Smarty

placing my smarty directory...[templates,cache, etc]
/var/www/htddocs/smarty/templates
...and i know its thee wrong place coz i really can''t follow where to put all this files.
and also i dont know what is my include_path.
is it /usr/local/include/ or /usr/include??
_________________
Very Happy
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Fri Mar 05, 2004 2:41 pm    Post subject: Reply with quote

The library directory is fine. If your document root is /var/www/htddocs, make the following:

/var/www/htdocs/index.php
/var/www/smarty/templates/
/var/www/smarty/templates_c/
/var/www/smarty/cache/
/var/www/smarty/configs/

Then in the /var/www/htdocs/index.php file:

[php:1:6a71c4a692]
<?php

require '/usr/local/lib/php/Smarty/Smarty.class.php';

$smarty =& new Smarty;

$smarty->template_dir = '/var/www/smarty/templates/';
$smarty->compile_dir = '/var/www/smarty/templates_c/';
$smarty->cache_dir = '/var/www/smarty/cache/';
$smarty->config_dir = '/var/www/smarty/configs/';

$smarty->display('index.tpl');

?>
[/php:1:6a71c4a692]

Make sure a /var/www/smarty/templates/index.tpl file exists, and templates_c is writable by your httpd process.

Monte
Back to top
View user's profile Send private message Visit poster's website
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 -> Installation and Setup 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