Forum Moderators: coopster
Any other ideas? I feel we are on the right track.
I dont work with php as a cgi, very often...so it could be something specific to using it from there as opposed to an Apache module.
If you are not using an extension for the files then you may have to use -
DefaultType application/x-httpd-php
[edited by: PHP_Chimp at 9:11 pm (utc) on Nov. 16, 2007]
If that doesnt work then at the moment I dont have any more ideas...will let you know if I come up with anything else though.
See each section that I wanted the PHP include to appear in, had a .tpl file and a main .php file. The .php file is where it starts, so basically all I did was make a copy of the .php file, and kept the name almost the same, I would just put ad_ in front of it. Then in the original .php file, the one that still has the original file name, I erased everything and added the code below:
<?php
function myfunction() {
include 'http://www.domain.com/php-include.php';
}
ob_start();
include 'ad_phppage.php';
$page = ob_get_contents();
ob_end_clean();ob_start();
myfunction();
$mystuff = ob_get_contents();
ob_end_clean();
echo str_replace( "***phpinclude***", $mystuff, $page );
?>
Then in the actual .tpl file, where I wanted the PHP include to go, I just put ***phpinclude***
Basically it just finds and replaces that with my PHP include code. So I guess it isn't that hard, it just depends on how many pages you have :) Thanks for all your help too, I really appreciate it.
[edited by: GalaxiDesigns at 12:28 am (utc) on Nov. 17, 2007]