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

include_php

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


Joined: 27 Jun 2003
Posts: 28
Location: Austria > Tyrol

PostPosted: Fri Oct 24, 2003 10:01 am    Post subject: include_php Reply with quote

Hi Community,

i have a little problem to get my smarty driven applcation work on localhost!

I have this code to produce a layer menü. In the menu.tpl i want to include a aphp file to get database results in the menu. This works already fine on my first installation. But with this installation i have problems:

Fatal error: Call to undefined function: () in c:\programme\apache group\apache\htdocs\statistik\smarty\libs\Smarty.class.php on line 1475

This is the code:

Code:

{include_php file="c:/programme/apache group/apache/htdocs/statistik/includes/js.php" scope="local"}


Hope, that anbody can help me!
regards Alex
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Fri Oct 24, 2003 10:28 am    Post subject: Reply with quote

thats a common error. use
{include_php file="file:c:/programme/apache group/apache/htdocs/statistik/includes/js.php" scope="local"}

(always use "file:" as resource-type when you use absolute paths).

the bogus error-message comes from the fact that smarty recognizes "c:" as the resource-type and can not find a resource-handler for it. this has been targetted in 2.6.0 where a resource-type's name has to have at least two-characters.

but nontheless: always use "file:" as resource-type when you use absolute paths)
Back to top
View user's profile Send private message Send e-mail Visit poster's website
holunda
Smarty Rookie


Joined: 27 Jun 2003
Posts: 28
Location: Austria > Tyrol

PostPosted: Fri Oct 24, 2003 10:44 am    Post subject: Reply with quote

Thank you messju, now it works well ...
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