PDA

View Full Version : including php in .tpl


bobby9101
03-22-2006, 12:51 AM
hello, i have two .php files and i would like to have them display in my footer of every page
how do i do this?
i was thinking i would assign a variable in index.php but i don't know how to do that either lol
thanx

anon
03-22-2006, 12:54 AM
{php} require_once ("the path and/or name of your .php file you want to use goes right here where i typed all of this mess. maybe i can be part of that footer now. that would be a nice jesture on your account."); {/php}

there are issues with require(" "); and also with include(" "); that are not phpld specific, but rather php specific. i just do my homework and always find the best possible solution via readin and research.

Optimit
03-22-2006, 12:55 AM
There are a couple of ways. One is to enclose the include in tags like this.

Content visible to registered users only.

but I prefer to create a .tpl file for the include data then use something like

Content visible to registered users only.

anon
03-22-2006, 12:58 AM
Opti, he said they were .php files.

different lingo, bud.

Optimit
03-22-2006, 01:01 AM
oops sorry, I shoulda read closer. Ju7st thought he was trying to use an ordinary include, like pulling in a table or something.

anon
03-22-2006, 01:03 AM
it's ok, now someone can read this thread, learn what to, and not to do for .php and also learn how to use smarty {inlcude file=""}

bobby9101
03-22-2006, 01:05 AM
thanx guys :-D
i got it working
i am releasing my new directory soon so i will give you both free regular link submissions
(a $2.95 value :-D)
PM me your
title, url, description, name, and e-mail address

anon
03-22-2006, 01:09 AM
bobby, hopefully you won't mind me taking a raincheck on your offer, because my directory isnt quite ready to roll just yet.

i would prefer a 100% running directory prior to links back, so I hope i can make a note of your generous offer, and take you up on that in a few weeks time.

Rob

bobby9101
03-22-2006, 01:11 AM
sounds good