Help Needed !

Started on the old forum in June 2008 · view the original in the archive · old links redirect here

18 replies · 1,036 views · started 18 years ago · 1 min read

9 participants
K3V Junior · 20 posts #1

Hey all, I have a lickle problem that i cant seem to get my head around and was thinkin' one of you might know what to do. I have added script to my test server and it runs fine so i added it to my main server but now when you try and post you get this error ...

Warning: Cannot modify header information - headers already sent by (output started at /home/kevadam/public_html/forum/index.php:1) in /home/kevadam/public_html/forum/index.php on line 197

Why am i getting this on my main server & not my test server ? & how can i get around this ?

Please, Thanks, K3V External image (may be gone)

ReGzBk Developer · 115 posts #2

u have put two headers in one so it cnt be modified with next header u have put in

ViSiT Ma SiTe Nd PoSt Ua CoMmEnTs On It In Ma PoSt

K3V Junior · 20 posts #3

u have put two headers in one so it cnt be modified with next header u have put in

That was the first thing i thought but the script is runnin' fine on my test server so that cant be the problem, Im pretty shure it has something to do with the server Thank you anyhow

WhiteWarrior Principal · 1,419 posts #4

what script you using?

and if its wml use

header("Content-type: text/vnd.wap.wml");
header("Cache-Control: no-store, no-cache, must-revalidate");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"" . " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
echo "<wml>";

if xhtml use

header("Content-type: text/html");
    header("Last-Modified: " . gmdate("D, dMYH:i:s") . " GMT");
    header("Cache-Control: no-cache, must-revalidate");
    header("Pragma: no-cache");
    echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
<html xmlns=\"http://www.w3.org/1999/xhtml\">\n";

thats what i use and they work fine and pass the vaild thinggy lol

alesh Lead · 604 posts #5

i have the same problem... at least similar... the thng is i use utf-8 headers cuz of čđšž letters... if i type those lettes in the scrirt,then if i want it 2 show those letters on the page i have 2 save tht file in utf-8 encoding... but then i get error 'headers cnt b modified bla bla headers already sent bla bla' so i learnd tht i simply have 2 save tht file in ANSI encoding nd typing letters čđšž as HTML special characters! boring but efective

eeeeerrr....

alesh Lead · 604 posts #8

the X is nt good 4 ur brain,if u have sum...lol

eeeeerrr....

WhiteWarrior Principal · 1,419 posts #10

LMAO!!! i can't believe he fell for that

amylee Principal · 1,092 posts #11

you ppl are mean lol

ravenhawk Junior · 11 posts #12

lmao even i know enough not to do that

subzero Super moderator Fellow · 3,954 posts #13

post 1 count on a life time ban at eblony

Dont post crap

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

alesh Lead · 604 posts #15

lol im just kidin, post the coding, ill fix it for you.

and u will fix what excatly 4 me? as i already told u kid, X is not good 4 ur brain !!!!

eeeeerrr....

K3V Junior · 20 posts #16

Its a forum,

    <?php

$hdr="hdr.html";  //Header template

$ftr="ftr.html";  //Footer template

///////////////////////////////////////////
if($_GET[id] == "view") { vFrm(); exit(); }
if($_GET[id] == "new") { nFrm(); exit(); }
if($_GET[id] == "reply") { rFrm(); exit(); }
if($_POST[post]) {
Validate();
sAve();
exit();
}

if($_POST[reply]) {
Validate();
RsAve();
exit();
}
hd();
echo <<<EOF
<table border="0" cellpadding="0" cellspacing="0" width="95%">
<tr><td width="380" height="10"></td>
<td width="270" height="10"><p align="right"><a href="index.php?id=new">
<img src=topic.png border=0></a>
</td></tr></table>
<table width="500" border='0' cellspacing='1' cellpadding="1" align='center' bgcolor='#000000'>
<tr><td width="33" align='center' bgcolor="#FFFFFF"></td>
<td bgcolor="#FFFFFF" width="381">[b]<font color="#000000" face="Verdana">Posts</font>[/b]</td>
<td bgcolor="#FFFFFF" align='center' width="174">[b]<font color="#000000" face="Verdana">Author</font>[/b]</td>
<td bgcolor="#FFFFFF" align='center' width="145">[b]<font color="#000000" face="Verdana">Date</font>[/b]</td></tr>
EOF;

dfil();

echo "</table>";
ft();

function dfil () {
$handle = opendir("data");
while($file = readdir($handle))
{
if( $file != "." && $file != ".." )
print doDat($file);
}
closedir( $handle );
}

function doDat($in) {
$fp= fopen("data/$in", "r");
$buffer = fgets($fp, 4096);
fclose($fp);
list($sub, $name, $email, $url, $date, $ico) = explode("||", trim($buffer));
if($ico) { $ico="<img src=smiles/$ico>"; } else { $ico=""; }
$tb=<<<EOF
<tr><td width="33" align='center' bgcolor='#FFFFFF' height="21">$ico</td>

<td bgcolor='#FFFFFF' width="381" height="21"><font color="#000000"></font>[url="index.php?id=view&p=$in"]<font face="Verdana" size="1" color="black">$sub</font>[/url]</td>
<td bgcolor='#FFFFFF' align='center' width="174" height="21">

[email="$email"]<font size="1" face="Verdana" color="#000000">$name</font>[/email]</p>
</td><td bgcolor='#FFFFFF' align='center' width="145" height="21">

<font size="1" face="Verdana" color="#000000">$date</font></p>
</td></tr>
EOF;
return $tb;
}

function vfrm() {
if(!$_GET[p]) {
clearstatcache();
header("Location: index.php");
exit();
}

if(!file_exists("data/$_GET[p]")) {
clearstatcache();
header("Location: index.php");
exit();
}

$n=1;

$ct= fopen("data/$_GET[p]", "r");
while (!feof($ct)) {
$dt = fgets($ct, 4096);

if($n != 1) { $dta.="$dt"; } else {
list($sub, $name, $email, $url, $date, $ico) = explode("||", $dt);
}

$n=$n+1;
}
fclose ($ct);
if($ico) { $ico="<img src=smiles/$ico>"; } else { $ico=""; }
hd();
echo <<<EOF
<HTML>
<HEAD>
<TITLE>$sub</TITLE></HEAD><BODY>
<center><table width="500" cellspacing="0" cellpadding="0" bgcolor="#000000" align='center'><tr><td bgcolor="#ffffff" align=left valign=center width="340"></td>
<td bgcolor="#ffffff" align=left valign=center width="120">
<p align="right"><a href="index.php?id=reply&p=$_GET[p]">

[img]reply.png[/img]</a></td></tr></table><table width="250" cellspacing='1' cellpadding='3' bgcolor="#000000" align='center'><tr><td bgcolor="#ffffff" align=left valign=center width="108"><font size='2' face='verdana' color='#ffffff'>Author:</font></td>
<td bgcolor="#ffffff" align=left valign=center width="300">
<font size='2' face='verdana' color='#000000'>Topic: $sub</font></td></tr><tr><td bgcolor='#ffffff' valign=top width="108">
<font size="2" face="Verdana" color="#000000">Posted by</font>
<font size='2' face='verdana' color='#000000'><font color=black>[b]
[/b]
</font></font><font size="1" face="Verdana" color="black">$name</font></td>

<td bgcolor='#ffffff' valign=top width="500">  
<table border="0" cellpadding="0" cellspacing="0" width="440"><tr>
<td width="340">

<font size='2' face='verdana' color='#000000'>$ico
<font color='000000' size='1'>Posted: $date</font></font></td>
<td width="95">

<font size='2' face='verdana' color='#000000'>
<font color='000000' size='1'><a href='mailto:$email?subject=Quoting $sub at K3Vs Server Forums'>
<img src='email.png' border='0' alt='Email'></a>
<a href='$url'>[img]homepage.png[/img]</a></font>
</font></td></tr></table> <table width=100% cellspacing=0 cellpadding=0><tr>
<td height=1 bgcolor='#000000'></td></tr></table>

<pre><font size='2' face='verdana' color='#000000'>$dta</font></pre>
</td></tr></table>
[url="../forum/"]<font size='2' face='verdana' color='#000000'>Back to Posts</font>[/url]</center></BODY></HTML>
EOF;
ft();
}

function nFrm() {
echo @fread(fopen("post.html", "r"), 100000);
}

function Validate() {
if(!trim($_POST[name])) { emPt(); }
if(!trim($_POST[email])) { emPt(); }
if(strpos($_POST[email], "@") == "") { emPt(); }

if(strpos($_POST[email], "@") == "") { emPt(); }

if(!trim($_POST[title])) { emPt(); }
if(!trim($_POST[msg])) { emPt(); }
}

function emPt() {
echo <<<EOF
<html><head><title>Empty fields!</title></head>
<body bgcolor="#ffffff" text="#000000" link="#000000" vlink="#000000" alink="#000000">
<p align="center">[b]<font color="red" face="Arial">Empty or invalid data!</font>[/b]</p>
</body></html>
EOF;
exit();
}

function sAve() {
$_POST[name]=str_replace("||", "|", $_POST[name]);
$_POST[email]=str_replace("||", "|", $_POST[email]);
$_POST[url]=str_replace("||", "|", $_POST[url]);
$_POST[msg]=str_replace("||", "|", $_POST[msg]);
$_POST[title]=str_replace("||", "|", $_POST[title]);

if(!trim($_POST[url])) { $url="#"; }
if(!trim($_POST[url]) == "http://") { $url="#"; }
$turl="aaaa$_POST[url]";
if(strpos($turl, "http://") == "") {
$url="http://$_POST[url]";
}
else {
$url="$_POST[url]";
}

$cn=@fread(fopen("cnt", "r"), 100000);
$cntd=$cn+1;
$a = fopen("cnt", "w+");
$write = fputs($a, "$cntd");
fclose($a);
$date=date("d-m-Y");
$msg=$_POST[msg];
$msg=strip_tags($msg,"
[b][i]<u><hr>

<a>");
$ct= fopen("smiles.txt", "r");
while (!feof($ct)) {
$sm = fgets($ct, 4096);
if(trim($sm)) {
list($n, $s) = explode("||", $sm);
$msg=str_replace(trim($n), "<img src=smiles/".trim($s).">", $msg);
}
}
fclose($ct);
$bdy=<<<EOF
$_POST[title]||$_POST[name]||$_POST[email]||$url||$date||$_POST[ico]
$msg
EOF;

$a = fopen("data/$cntd", "w+");
$write = fputs($a, "$bdy");
fclose($a);
header("Location: index.php?nw=post");
exit();
}

function rFrm() {
if(!trim($_GET[p])) {
header("Location: index.php");
exit();
}

if(!file_exists("data/$_GET[p]")) {
clearstatcache();
header("Location: index.php");
exit();
}

$fp= fopen("data/$_GET[p]", "r");
$buffer = fgets($fp, 4096);
fclose($fp);

list($sub, $name, $email, $url, $date, $ico) = explode("||", $buffer);
$rdt=@fread(fopen("reply.html", "r"), 100000);
$rdt=str_replace("[SUB]", $sub, $rdt);
$rdt=str_replace("[P]", $_GET[p], $rdt);
echo $rdt;
exit();
}
//####################################################//
function RsAve() {

$_POST[name]=str_replace("||", "|", $_POST[name]);
$_POST[email]=str_replace("||", "|", $_POST[email]);
$_POST[url]=str_replace("||", "|", $_POST[url]);
$_POST[msg]=str_replace("||", "|", $_POST[msg]);
$_POST[title]=str_replace("||", "|", $_POST[title]);

if(trim($_POST[url]) == "" && trim($_POST[url]) == "http://") { $url = "#"; }
else {
if(!strpos($_POST[url], "http://")) { $url="http://$url"; }
}

$cn=@fread(fopen("cnt", "r"), 100000);
$cntd=$cn+1;
$a = fopen("cnt", "w+");
$write = fputs($a, "$cntd");
fclose($a);
$date=date("d-m-Y");
$msg=$_POST[msg];
$ct= fopen("smiles.txt", "r");
while (!feof($ct)) {
$sm = fgets($ct, 4096);
if(trim($sm)) {
list($n, $s) = explode("||", $sm);
$msg=str_replace(trim($n), "<img src=smiles/".trim($s).">", $msg);
}
}
fclose($ct);

$n=1;
$ct2=fopen("data/$_POST[p]", "r");
while (!feof($ct2)) {
$dt = fgets($ct2, 4096);
if($n != 1) { $dta.="$dt"; } else {
list($sub, $name, $email, $url, $date, $ico) = explode("||", $dt);
}
$n=$n+1;
}
fclose($ct2);

$tdt=<<<EOF
<table align="center" border="1" cellpadding="5" cellspacing="0" width="445" bordercolor="#ffffff" bordercolordark="#ffffff" bordercolorlight="#ffffff">
<tr><td width="431">

<font size="1" face="Verdana" color="#000000">In Reply to: </font>[url="index.php?id=view&p=$_POST[p]"]<font size="1" face="Verdana" color="#000000">$sub</font>[/url]<font size="1" face="Verdana" color="#000000"> 
[ by $name ]</font></p>
</td></tr></table>
EOF;

$msg="$tdt
\n$msg";
$_POST[title]=str_replace("Re:", "[b]Re:[/b]", $_POST[title]);
$bdy=<<<EOF
$_POST[title]||$_POST[name]||$_POST[email]||$url||$date||$_POST[ico]
$msg
EOF;

$a = fopen("data/$cntd", "w+");
$write = fputs($a, "$bdy");
fclose($a);
header("Location: index.php?nw=post");
exit();
}

function hd() {
global $hdr;
$data=@fread(fopen("$hdr", "r"), 100000);
echo $data;
}

function ft() {
global $ftr;
$data=@fread(fopen("$ftr", "r"), 100000);
echo $data;
}
?>

This is only the index but its where im havin' the problem

wizard Senior · 493 posts #17

Its a forum,

    <?php

$hdr="hdr.html";  //Header template

$ftr="ftr.html";  //Footer template

///////////////////////////////////////////
if($_GET[id] == "view") { vFrm(); exit(); }
if($_GET[id] == "new") { nFrm(); exit(); }
if($_GET[id] == "reply") { rFrm(); exit(); }
if($_POST) {
Validate();
sAve();
exit();
}

if($_POST[reply]) {
Validate();
RsAve();
exit();
}
hd();
echo <<<EOF
<table border="0" cellpadding="0" cellspacing="0" width="95%">
<tr><td width="380" height="10"></td>
<td width="270" height="10"><p align="right"><a href="index.php?id=new">
<img src=topic.png border=0></a>
</td></tr></table>
<table width="500" border='0' cellspacing='1' cellpadding="1" align='center' bgcolor='#000000'>
<tr><td width="33" align='center' bgcolor="#FFFFFF"></td>
<td bgcolor="#FFFFFF" width="381"><font color="#000000" face="Verdana">Posts</font></td>
<td bgcolor="#FFFFFF" align='center' width="174"><font color="#000000" face="Verdana">Author</font></td>
<td bgcolor="#FFFFFF" align='center' width="145"><font color="#000000" face="Verdana">Date</font></td></tr>
EOF;

dfil();

echo "</table>";
ft();

function dfil () {
$handle = opendir("data");
while($file = readdir($handle))
{
if( $file != "." && $file != ".." )
print doDat($file);
}
closedir( $handle );
}
function doDat($in) {
$fp= fopen("data/$in", "r");
$buffer = fgets($fp, 4096);
fclose($fp);
list($sub, $name, $email, $url, $date, $ico) = explode("||", trim($buffer));
if($ico) { $ico="<img src=smiles/$ico>"; } else { $ico=""; }
$tb=<<<EOF
<tr><td width="33" align='center' bgcolor='#FFFFFF' height="21">$ico</td>

<td bgcolor='#FFFFFF' width="381" height="21"><font color="#000000"></font><font face="Verdana" size="1" color="black">$sub</font></td>
<td bgcolor='#FFFFFF' align='center' width="174" height="21">

<font size="1" face="Verdana" color="#000000">$name</font></p>
</td><td bgcolor='#FFFFFF' align='center' width="145" height="21">

<font size="1" face="Verdana" color="#000000">$date</font></p>
</td></tr>
EOF;
return $tb;
}
function vfrm() {
if(!$_GET[p]) {
clearstatcache();
header("Location: index.php");
exit();
}

if(!file_exists("data/$_GET[p]")) {
clearstatcache();
header("Location: index.php");
exit();
}

$n=1;

$ct= fopen("data/$_GET[p]", "r");
while (!feof($ct)) {
$dt = fgets($ct, 4096);

if($n != 1) { $dta.="$dt"; } else {
list($sub, $name, $email, $url, $date, $ico) = explode("||", $dt);
}

$n=$n+1;
}
fclose ($ct);
if($ico) { $ico="<img src=smiles/$ico>"; } else { $ico=""; }
hd();
echo <<<EOF
<HTML>
<HEAD>
<TITLE>$sub</TITLE></HEAD><BODY>
<center><table width="500" cellspacing="0" cellpadding="0" bgcolor="#000000" align='center'><tr><td bgcolor="#ffffff" align=left valign=center width="340"></td>
<td bgcolor="#ffffff" align=left valign=center width="120">
<p align="right"><a href="index.php?id=reply&p=$_GET[p]">

reply.png</a></td></tr></table><table width="250" cellspacing='1' cellpadding='3' bgcolor="#000000" align='center'><tr><td bgcolor="#ffffff" align=left valign=center width="108"><font size='2' face='verdana' color='#ffffff'>Author:</font></td>
<td bgcolor="#ffffff" align=left valign=center width="300">
<font size='2' face='verdana' color='#000000'>Topic: $sub</font></td></tr><tr><td bgcolor='#ffffff' valign=top width="108">
<font size="2" face="Verdana" color="#000000">Posted by</font>
<font size='2' face='verdana' color='#000000'><font color=black>

</font></font><font size="1" face="Verdana" color="black">$name</font></td>

<td bgcolor='#ffffff' valign=top width="500">  
<table border="0" cellpadding="0" cellspacing="0" width="440"><tr>
<td width="340">

<font size='2' face='verdana' color='#000000'>$ico
<font color='000000' size='1'>Posted: $date</font></font></td>
<td width="95">

<font size='2' face='verdana' color='#000000'>
<font color='000000' size='1'><a href='mailto:$email?subject=Quoting $sub at K3Vs Server Forums'>
<img src='email.png' border='0' alt='Email'></a>
<a href='$url'>homepage.png</a></font>
</font></td></tr></table> <table width=100% cellspacing=0 cellpadding=0><tr>
<td height=1 bgcolor='#000000'></td></tr></table>

<pre><font size='2' face='verdana' color='#000000'>$dta</font></pre>
</td></tr></table>
<font size='2' face='verdana' color='#000000'>Back to Posts</font></center></BODY></HTML>
EOF;
ft();
}

function nFrm() {
echo @fread(fopen("post.html", "r"), 100000);
}

function Validate() {
if(!trim($_POST[name])) { emPt(); }
if(!trim($_POST)) { emPt(); }
if(strpos($_POST, "@") == "") { emPt(); }

if(strpos($_POST, "@") == "") { emPt(); }

if(!trim($_POST[title])) { emPt(); }
if(!trim($_POST[msg])) { emPt(); }
}

function emPt() {
echo <<<EOF
<html><head><title>Empty fields!</title></head>
<body bgcolor="#ffffff" text="#000000" link="#000000" vlink="#000000" alink="#000000">
<p align="center"><font color="red" face="Arial">Empty or invalid data!</font></p>
</body></html>
EOF;
exit();
}

function sAve() {
$_POST[name]=str_replace("||", "|", $_POST[name]);
$_POST=str_replace("||", "|", $_POST);
$_POST=str_replace("||", "|", $_POST);
$_POST[msg]=str_replace("||", "|", $_POST[msg]);
$_POST[title]=str_replace("||", "|", $_POST[title]);

if(!trim($_POST)) { $url="#"; }
if(!trim($_POST) == "http://") { $url="#"; }
$turl="aaaa$_POST";
if(strpos($turl, "http://") == "") {
$url="http://$_POST";
}
else {
$url="$_POST";
}

$cn=@fread(fopen("cnt", "r"), 100000);
$cntd=$cn+1;
$a = fopen("cnt", "w+");
$write = fputs($a, "$cntd");
fclose($a);
$date=date("d-m-Y");
$msg=$_POST[msg];
$msg=strip_tags($msg,"
<u><hr>

<a>");
$ct= fopen("smiles.txt", "r");
while (!feof($ct)) {
$sm = fgets($ct, 4096);
if(trim($sm)) {
list($n, $s) = explode("||", $sm);
$msg=str_replace(trim($n), "<img src=smiles/".trim($s).">", $msg);
}
}
fclose($ct);
$bdy=<<<EOF
$_POST[title]||$_POST[name]||$_POST||$url||$date||$_POST[ico]
$msg
EOF;
$a = fopen("data/$cntd", "w+");
$write = fputs($a, "$bdy");
fclose($a);
header("Location: index.php?nw=post");
exit();
}
function rFrm() {
if(!trim($_GET[p])) {
header("Location: index.php");
exit();
}

if(!file_exists("data/$_GET[p]")) {
clearstatcache();
header("Location: index.php");
exit();
}

$fp= fopen("data/$_GET[p]", "r");
$buffer = fgets($fp, 4096);
fclose($fp);

list($sub, $name, $email, $url, $date, $ico) = explode("||", $buffer);
$rdt=@fread(fopen("reply.html", "r"), 100000);
$rdt=str_replace("", $sub, $rdt);
$rdt=str_replace("[P]", $_GET[p], $rdt);
echo $rdt;
exit();
}
//####################################################//
function RsAve() {

$_POST[name]=str_replace("||", "|", $_POST[name]);
$_POST=str_replace("||", "|", $_POST);
$_POST=str_replace("||", "|", $_POST);
$_POST[msg]=str_replace("||", "|", $_POST[msg]);
$_POST[title]=str_replace("||", "|", $_POST[title]);

if(trim($_POST) == "" && trim($_POST) == "http://") { $url = "#"; }
else {
if(!strpos($_POST, "http://")) { $url="http://$url"; }
}

$cn=@fread(fopen("cnt", "r"), 100000);
$cntd=$cn+1;
$a = fopen("cnt", "w+");
$write = fputs($a, "$cntd");
fclose($a);
$date=date("d-m-Y");
$msg=$_POST[msg];
$ct= fopen("smiles.txt", "r");
while (!feof($ct)) {
$sm = fgets($ct, 4096);
if(trim($sm)) {
list($n, $s) = explode("||", $sm);
$msg=str_replace(trim($n), "<img src=smiles/".trim($s).">", $msg);
}
}
fclose($ct);

$n=1;
$ct2=fopen("data/$_POST[p]", "r");
while (!feof($ct2)) {
$dt = fgets($ct2, 4096);
if($n != 1) { $dta.="$dt"; } else {
list($sub, $name, $email, $url, $date, $ico) = explode("||", $dt);
}
$n=$n+1;
}
fclose($ct2);

$tdt=<<<EOF
<table align="center" border="1" cellpadding="5" cellspacing="0" width="445" bordercolor="#ffffff" bordercolordark="#ffffff" bordercolorlight="#ffffff">
<tr><td width="431">


<font size="1" face="Verdana" color="#000000">In Reply to: </font>"]<font size="1" face="Verdana" color="#000000">$sub</font><font size="1" face="Verdana" color="#000000"> 
[ by $name ]</font></p>
</td></tr></table>
EOF;

$msg="$tdt
\n$msg";
$_POST[title]=str_replace("Re:", "Re:", $_POST[title]);
$bdy=<<<EOF
$_POST[title]||$_POST[name]||$_POST||$url||$date||$_POST[ico]
$msg
EOF;

$a = fopen("data/$cntd", "w+");
$write = fputs($a, "$bdy");
fclose($a);
header("Location: index.php?nw=post");
exit();
}

function hd() {
global $hdr;
$data=@fread(fopen("$hdr", "r"), 100000);
echo $data;
}

function ft() {
global $ftr;
$data=@fread(fopen("$ftr", "r"), 100000);
echo $data;
}
?>

This is only the index but its where im havin' the problem

make sure you do not have any output at all before the header() codes.

subzero Super moderator Fellow · 3,954 posts #19

Hmmmm better way to do this

<?php

function header()
{
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<link rel="shortcut icon" href="favicon.ico" />
}
function footer()
{
</body>
</html>
}

place that in headfoot.php


now try in your main script include("headfoot.php");

When you wont the head just type header(); and foot footer();

You can do 1 to 3 sets like header(3);

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close