PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > How-to Forum

Reply
 
Thread Tools
Old 10-24-2003, 05:47 PM   #1
sid
Former Member
 
Join Date: Sep 2003
Posts: 34
Angry Using PHP include in templates

I tied all the methods of using PHP in including PHP include in templates, but didn't work

Anyone know how to do it?
sid is offline   Reply With Quote
Old 10-25-2003, 05:47 AM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. In this thread, there are two methods for including PHP in the templates, along with the .htaccess method. The two methods for including PHP in the templates should work with PhpDig version 1.6.2. What happens when you try them?
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 10-26-2003, 01:34 AM   #3
sid
Former Member
 
Join Date: Sep 2003
Posts: 34
Hi,
If I try all method 1 and 2 from search_function.php and phpdig_function_form.php , what it does is: It automatically displays the include without me adding something like <phgdig:include/> in the templates and it displays the include at the top of the page automatically, but, I want it to display it below the search box... and if I add <phpdig:include/> below the search box, it won't work. As for the .htaccess, other PHP variables and stuff work but only include doesn't , it displays nothing when I add the include code... Any help would be appreciated.
sid is offline   Reply With Quote
Old 11-23-2003, 06:06 AM   #4
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Are you trying to do an include as in include "filename.php";? If so, perhaps try, in filename.php, assigning the content to a variable like $incl_text = "text"; or $incl_text = <<<END (on one line) text END; (on one line), include the filename.php file in function_phpdig_form.php, and then use the $incl_text variable in place of $do_php_here; in method one of this thread.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP includes in templates gman How-to Forum 14 12-03-2004 10:02 PM
How to use PHP include to include the Google result pages? sid Coding & Tutorials 1 01-07-2004 04:53 AM
Newbie : How to include PHP file (.php) frostbyte How-to Forum 1 01-04-2004 11:42 AM
PHP eval support in templates joeboe How-to Forum 3 12-08-2003 10:37 PM
Templates - cannot get index.php to display different one jirving How-to Forum 9 09-29-2003 05:57 AM


All times are GMT -8. The time now is 11:40 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.