Smarty problems

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
pedro84
Forum Newbie
Posts: 11
Joined: Sat Oct 21, 2006 11:28 am

Smarty problems

Post by pedro84 »

I have just installed Smarty System.
It looks nice.
But I have questions about it:
1. can I move files from libs directory anywhere? they are in my root directory, but I don;t want to:) I tried do it but I can;t. I'm too stupid:(
2. Second and last, how to create..pages different than index.php?? Cry

Forgive my, but I'm n00bie to php. I prefered HTML+CSS.

Greetings
Pedro
jmut
Forum Regular
Posts: 945
Joined: Tue Jul 05, 2005 3:54 am
Location: Sofia, Bulgaria
Contact:

Post by jmut »

http://smarty.php.net/manual/en/index.php

is your friend.
try doing some simple stuff first.
You can put smarty dir anywhere you want. just include it correctly (having read permissions with web user of course).

for any concrete problems let us know.
pedro84
Forum Newbie
Posts: 11
Joined: Sat Oct 21, 2006 11:28 am

Post by pedro84 »

When I moved them i got this:

Code: Select all

Warning: Smarty error: unable to read resource: "ex.tpl" in c:\usr\apache\httpd\html\Smarty-2.6.14\libs\Smarty.class.php on line 1095
jmut
Forum Regular
Posts: 945
Joined: Tue Jul 05, 2005 3:54 am
Location: Sofia, Bulgaria
Contact:

Post by jmut »

pedro84 wrote:When I moved them i got this:

Code: Select all

Warning: Smarty error: unable to read resource: "ex.tpl" in c:\usr\apache\httpd\html\Smarty-2.6.14\libs\Smarty.class.php on line 1095
so you are moving the /templates directory where all templates are located not...the smarty lib itself.

http://smarty.php.net/manual/en/api.var ... mplate.dir

Code: Select all

you can set it using

$smarty->template_dir = 'fullpath/to/directory/where/put/all/templates';     //by default this is /templates
edit: also make sure your templates_c (cache) directory is write-able by the web user...by default smarty is caching.
Post Reply