PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   How-to Forum (http://www.phpdig.net/forum/forumdisplay.php?f=33)
-   -   Using PHP include in templates (http://www.phpdig.net/forum/showthread.php?t=172)

sid 10-24-2003 05:47 PM

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?

Charter 10-25-2003 05:47 AM

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?

sid 10-26-2003 01:34 AM

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.

Charter 11-23-2003 06:06 AM

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.


All times are GMT -8. The time now is 01:21 AM.

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