Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
vinnievegas
New Member
New Member


Joined: Jan 27, 2005
Posts: 1

PostPosted: Thu Jan 27, 2005 8:58 am Reply with quote

I read the tutorial on how to creat a block with html file in it. here is the code it tells me to use.
Code:
ob_start(); 

include("foo/bar.php");
$output = ob_get_contents();
ob_end_clean();
$content = $output;

But what is the rest of the code i need before and after the code above?
 
View user's profile Send private message
sixonetonoffun
Spouse Contemplates Divorce


Joined: Jan 02, 2003
Posts: 2496

PostPosted: Thu Jan 27, 2005 9:06 am Reply with quote

Something like this
Code:


<?php
if (stristr("block-Sample_Block.php", $_SERVER['SCRIPT_NAME'])) { Header("Location: index.php"); }
$content="";
ob_start();
include("foo/bar.php");
$output = ob_get_contents();
ob_end_clean();
$content = $output;
?>

_________________
[b][size=5]openSUSE 11.4-x86 | Linux 2.6.37.1-1.2desktop i686 | KDE: 4.6.41>=4.7 | XFCE 4.8 | AMD Athlon(tm) XP 3000+ | MSI K7N2 Delta-L | 3GB Black Diamond DDR
| GeForce 6200@433Mhz 512MB | Xorg 1.9.3 | NVIDIA 270.30[/size:2b8 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©