Laddade just upp sidan jag byggt, men tydligen vill ej php leka den leken jag vill just nu...
<?
include("./header.php");
include("./variablar.php");
if ((!isset($_GET['page'])) || ($_GET['page'] == "nyheter.php")) {
header("Location:nyheter.php");
}
?>
Ger detta felmeddelandet...
Warning: Cannot add header information - headers already sent by (output started at /customers/minadress.com/minadress.com/httpd.www/header.php:4) in /customers/minadress.com/minadress.com/httpd.www/index.php on line 7
Men inte nog med det, får ytterliggare felsvar...
<?
include("./head.php");
?>
<center>
<table border=1 bordercolor="#FFFFFF" width="450">
<tr bgColor="#FFFFFF"><b><div align="center"><font color="#0E3059">Tabell</font></div></b>
</tr>
<td width="100%" height="*" valign="top" bgcolor="#0E3059" border="0">
<table width="100%" border="0" bordercolor="000000" cellpadding="0" cellspacing="3">
<tr>
<td colspan="2"><b>TABELL</b></td>
<td align="center" width="5%"><b>Matcher</b></td>
<td align="center" width="5%"><b>V</b></td>
<td align="center" width="5%"><b>O</b></td>
<td align="center" width="5%"><b>F</b></td>
<td align="center" width="5%"><b>+</b></td>
<td align="center" width="5%"><b>-</b></td>
<td align="center" width="5%"><b>+/-</b></td>
<td align="center" width="5%"><b>P</b></td>
<td align="center" width="5%"><b>
<?
$content = file_get_contents("http://www.innebandy.se/Table.asp?TournamentId=10000");
$str = preg_match("/SDV(.*?)KOMMANDE MATCHER/is", $content, $match);
$i = $match[0];
$str = preg_replace("!\\<a href=(.*?)\\>(.*?)\\</a\\>!i", "\\2", $i);
echo $str;
?>
</td>
</tr>
</table>
<center>
Tabellen uppdateras automatiskt från innebandy.se
<a href="http://www.innebandy.se/Table.asp?TournamentId=10000" target="_blank">:: Tabellen<a/>
</center>
</td>
</table>
Fatal error: Call to undefined function: file_get_contents() in /customers/ibfhedemora.se/ibfhedemora.se/httpd.www/HerrA.php on line 23
När jag just skulle testa gästboken, så gick allt bra. Fram till jag postat något och fick detta tillsvars...
**Warning: Cannot add header information - headers already sent by (output started at /customers/minadress.com/minadress.com/httpd.www/header.php:4) in /customers/minadress.com/minadress.com/httpd.www/guestbook_add.php on line 16
Warning: Cannot add header information - headers already sent by (output started at /customers/minadress.com/minadress.com/httpd.www/header.php:4) in /customers/minadress.com/minadress.com/httpd.www/guestbook_add.php on line 17**
detta är guestbok_add koden
<?
include("data.php");
include("./head.php");
if ($_GET['add'] == "yes") {
if(strlen($_POST['name']) < 1) {
header("Location: guestbook.php?write=new&error=nullish");
} elseif(strlen($_POST['msg']) < 2) {
header("Location: guestbook.php?write=new&error=msg");
} elseif ($_COOKIE['shouted'] == "yes") {
header("Location: guestbook.php?write=new&error=written");
} else {
$conn = mysql_connect("$dbhost", "$dbuser", "$dbpass");
mysql_db_query($databas, "INSERT guestbook (name, msg, date, ip, url, email, svar) VALUES ('".$_POST['name']."', '".$_POST['msg']."', '".$_POST['date']."', '".$_POST['ip']."', '".$_POST['url']."', '".$_POST['email']."', '".$_POST['svar']."')") or exit(mysql_error());
mysql_close($conn);
setcookie ("shouted","yes", time()+3600);
header("Location: guestbook.php");
}
}
include("./foot.php");
?>
Varför vill ej b-one det jag vill? (de hade tydligen version 4,2 om jag förstod det rätt)