how to include a poll booth application
| From: | Oguz Altun | Date: | Sat, 31 Mar 2001 16:58:39 +0000 |
| Subject: | how to include a poll booth application | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-505@lists.php.net to get a copy of this message | ||
Hi,
I am new to smarty. I read docs but I just got more confused. I am trying to
integrate a poll application i found in hotscripts to my site. I first tried
to use {{include file="../poll/poll_cookie.php"}}
{{include file="../poll/booth.php"}}
but I got this:
Warning: Failed opening './smarty/template_c/../anket/poll_cookie.php.php'
for inclusion (include_path='.:/usr/local/apache_php4/lib/php') in
/www/planet.net.tr/demo/oz/sf/film/smarty/template_c/movie.tpl.php on line 1
I opened a movie.tpl.php and saw the path,
./smarty/template_c/../anket/poll_cookie.php.php. This is probably not a
valid path. shouldn't smarty take care of that?
Anyway, what is the best way to integrate such applications into your
smarty-powered-website? After
unsuccessfully trying <?php include "../poll/booth.php?> in movie.tpl, I
tried using
$poll = join(" ", file("http://www.mysite.com/poll/booth.php")
which worked
fine. But making another http request to apache everytime one calls the page
can decrease performance. What do you say about that?
In the docs there is an insert builtin function. Is it a better idea to use
that instead of the one above?
Thanks.