iadmirevb
05-01-2010, 05:09 PM
Hello,
I've read all about including a php file but i'm having issues. More precisely, speed issues.
I've utilized the plugin system and hook at global_start to include a php file in my header like this:
ob_start();
include('http://www.mysite.com/header/header.php');
$fanclubheader = ob_get_contents();
ob_end_clean();
And I'm calling this code in the header template using the following:
$fanclubheader
<!-- content table -->
$spacer_open
$_phpinclude_output
$ad_location[ad_header_end]
For testing purposes, i've made the header.php very simple:
<?php
echo "Test";
?>
For some reason, it takes between 10 to 15 seconds for my forum to load. When i disable the plugin, it takes 1-3 seconds (normal time).
Sometimes (not all the time), i'm getting this in the header:
Warning: include(http://www.mysite.com/header/header.php) [function.include]: failed to open stream: Connection timed out in [path]/global.php(400) : eval()'d code on line 2
Warning: include() [function.include]: Failed opening 'http://www.mysite.com/header/header.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in [path]/global.php(400) : eval()'d code on line 2
Any idea what the problem could be? I can't figure out this one.
Thanks in advance for all your help
Marco
I've read all about including a php file but i'm having issues. More precisely, speed issues.
I've utilized the plugin system and hook at global_start to include a php file in my header like this:
ob_start();
include('http://www.mysite.com/header/header.php');
$fanclubheader = ob_get_contents();
ob_end_clean();
And I'm calling this code in the header template using the following:
$fanclubheader
<!-- content table -->
$spacer_open
$_phpinclude_output
$ad_location[ad_header_end]
For testing purposes, i've made the header.php very simple:
<?php
echo "Test";
?>
For some reason, it takes between 10 to 15 seconds for my forum to load. When i disable the plugin, it takes 1-3 seconds (normal time).
Sometimes (not all the time), i'm getting this in the header:
Warning: include(http://www.mysite.com/header/header.php) [function.include]: failed to open stream: Connection timed out in [path]/global.php(400) : eval()'d code on line 2
Warning: include() [function.include]: Failed opening 'http://www.mysite.com/header/header.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in [path]/global.php(400) : eval()'d code on line 2
Any idea what the problem could be? I can't figure out this one.
Thanks in advance for all your help
Marco