View Full Version : Using PHP include in templates

10-24-2003, 05:47 PM
I tied all the methods of using PHP in including PHP include in templates, but didn't work :(

Anyone know how to do it?

10-25-2003, 05:47 AM
Hi. In this (http://www.phpdig.net/showthread.php?threadid=74) 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?

10-26-2003, 01:34 AM
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.

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 (http://www.phpdig.net/showthread.php?threadid=74) thread.