Re: [SMARTY-GENERAL] Smarty using php Includes for poll

From: Date: Mon, 01 Apr 2002 19:19:41 +0000
Subject: Re: [SMARTY-GENERAL] Smarty using php Includes for poll
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3426@lists.php.net to get a copy of this message
Take a look at the include_php function, you can include a php file pretty easily that way. MishY wrote:
Hey, I have a poll system that I would like to add to my templates. <?php require 'c:/program files/apache/htdocs/poll/booth.php'; display_booth(1); ?> Would be the normal way of calling it however if I were to add this to any of my *.tpl files the poll isn't included. If I then turn on PHP tags in tpl files in the smarty config file upon requesting a page where the poll is meant to be there is nothing but "Unable to connect to database". I should stress that I KNOW the poll system works completely. Infact I have it working on non-templatized pages. Is there anyway for me to include what I need to include to get this poll working through using smartys template system ? This is what I have to add : <?php require 'c:/program files/apache/htdocs/poll/booth.php'; display_booth(1); ?> Any ideas, or suggestions would be greatly appreciated !! I have just spent the best part of 3 hrs trying to get this thing working LOL :) Thanks
-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.

« previous php.smarty.general (#3426) next »