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

config_load doesn't work

 
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
lodjikz
Smarty Rookie


Joined: 21 Jul 2005
Posts: 9

PostPosted: Thu Jul 21, 2005 10:57 pm    Post subject: config_load doesn't work Reply with quote

hi

i've been trying to load a .conf file inside this template but always get this error:

PHP Warning: Smarty error: unable to read resource: "{menus.conf" in C:\Programas\PHP-5.0.4\smarty\libs\Smarty.class.php on line 1088

the name of the conf file is a smarty variable passed through some index.php. is this the problem?

{config_load file="{$path_conf}" section="{$menu_conf}"}

the source-code of the page doesnt show this part of the first part of the tag: {config_load file="{$path_conf}"

why is that? can anybody help me?

Thanks.
Back to top
View user's profile Send private message
boots
Administrator


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

PostPosted: Thu Jul 21, 2005 11:05 pm    Post subject: Reply with quote

It works fine -- you just aren't using it properly Wink

{config_load file=$path_conf section=$menu_conf}

Do read the basic syntax section of the manual:

http://smarty.php.net/manual/en/language.basic.syntax.php

In fact, give the whole manual the once over. It doesn't take long and it can save you countless hours of frustration.

Greetings.
Back to top
View user's profile Send private message
lodjikz
Smarty Rookie


Joined: 21 Jul 2005
Posts: 9

PostPosted: Fri Jul 22, 2005 12:40 am    Post subject: Reply with quote

hey there thx for the quick answer.

i did read the manual first.
i made a mistake by not putting my .conf in the $configs_dir.
now i solved it plus added your solution but still i get
unable to read resource...

Greetings
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