hulp bij 'headers already sent error'

Overzicht Reageren

Sponsored by: Vacatures door Monsterboard

Pagina: « vorige 1 2

Tobias

Tobias

22/12/2004 16:48:00
Quote Anchor link
Lijkt mij wel, als je wilt dat wij de fout ontdekken ;)
 
PHP hulp

PHP hulp

15/11/2024 18:52:45
 
Sjefke

sjefke

22/12/2004 16:50:00
Quote Anchor link
mss een beetje lompe code maja

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<?php
//includes
include "includes/include.php";

echo "<html>";
echo "<head>";
echo "<LINK href='".$style."' type=text/css rel=stylesheet>";
echo "<title>".$titel."</title>";
echo "</head>";
echo "<BODY bgColor='#929292' background='".$achtergrond."'>";


echo "<DIV align='center'>";
echo "<a href='?page=home'><img border='0' src='http://www.thevissite.nl/computerplanet/img/v1/header.gif'></a>";
echo "<TABLE id='table1' cellPadding='0' width='860' border='0'>";
echo "<TBODY>";
echo "<TR>";
echo "<TD vAlign='top' bgColor='#e5e5e5'>";
echo "<TABLE id='table2' cellSpacing='0' cellPadding='5' width='160' border='0' height='256'>";
echo "<TBODY>";
echo "<TR>";
echo "<TD height='246' valign='top'>";


echo "<table border='0' width='100%' cellspacing='0' cellpadding='0'>";
echo "<tr>";
echo "<td width='100%' background='".$bgimage."' bgcolor='".$bgcoler."'><b>Menu</b></td>";
echo "</tr>";
echo "<tr>";
echo "<td width='100%'>";
include "menu/linksboven.php";
echo "</td>";
echo "</tr>";
echo "</table>";


echo "&nbsp;";


echo "<table border='0' width='100%' cellspacing='0' cellpadding='0'>";
echo "<tr>";
echo "<td width='100%' background='".$bgimage."' bgcolor='".$bgcoler."'><b>Leden</b></td>";
echo "</tr>";
echo "<tr>";
echo "<td width='100%'>";
include "menu/leden.php";
echo "</td>";
echo "</tr>";
echo "</table>";


echo "&nbsp;";


echo "<table border='0' width='100%' cellspacing='0' cellpadding='0'>";
echo "<tr>";
echo "<td width='100%' background='".$bgimage."' bgcolor='".$bgcoler."'><b>Overige</b></td>";
echo "</tr>";
echo "<tr>";
echo "<td width='100%'>";
include "menu/linksonder.php";
echo "</td>";
echo "</tr>";
echo "</table>";


echo "</TD></TR></TBODY></TABLE></TD>";
echo "<TD vAlign='top' bgColor='#efefef'>";
echo "<TABLE id='table8' cellSpacing='0' cellPadding='0' width='540' border='0'>";
echo "<TBODY>";
echo "<TR>";
echo "<TD vAlign='top' width='100%' bgColor='#e5e5e5' height='438'>";
echo "<DIV align='center'>";
echo "<TABLE id='table9' width='540' border='0'>";
echo "<TBODY>";
echo "<TR>";
echo "<TD class=content>";


//begin pagina systeem
if(!$_GET['page'])
               $_GET['page'] = "home";

           if(file_exists($_GET['page'].'.php'))
               include($_GET['page'].'.php');
           else
               include("fout.php");

//einde pagina systeem


echo "&nbsp;";


echo "</td></TR></TBODY></TABLE></DIV>";
echo "<DIV></DIV>";
echo "<DIV></DIV>";
echo "<DIV></DIV></TD><td valign='top' width='160' style='border-left: 1px solid #929292' bgcolor='#e5e5e5'>";
echo "<TABLE id='table2' cellSpacing='0' cellPadding='5' width='160' border='0'>";
echo "<tr>";
echo "<td>";


echo "<table border='0' width='100%' cellspacing='0' cellpadding='0'>";
echo "<tr>";
echo "<td width='100%' background='".$bgimage."' bgcolor='".$bgcoler."'><b>Nieuwe Topics</b></td>";
echo "</tr>";
echo "<tr>";
echo "<td width='100%'>";
include "menu/rechtsboven.php";
echo "</td>";
echo "</tr>";
echo "</table>";


echo "&nbsp;";


echo "<table border='0' width='100%' cellspacing='0' cellpadding='0'>";
echo "<tr>";
echo "<td width='100%' background='".$bgimage."' bgcolor='".$bgcoler."'><b>Linkpartners</b></td>";
echo "</tr>";
echo "<tr>";
echo "<td width='100%'>";
include "menu/rechtsonder.php";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "</td></tr></table></td></TR></TBODY></TABLE>";
echo "<DIV></DIV>";
echo "<TR>";
echo "<TD class=datumtijd style='BORDER-RIGHT: #929292 0px solid' vAlign='top' bgColor='#e5e5e5'> </TD>";
echo "<TD class=copyright style='BORDER-LEFT: #929292 0px solid' vAlign='top' bgColor='#e5e5e5'>";
echo "<center>";
include "includes/copy.php";
echo "</TD></TR>";
echo "</table></FORM>";
echo "</BODY>";
echo "</html>";
?>


daqt was hem
 

22/12/2004 16:58:00
Quote Anchor link
Je moet zorgen dat die code van inlog.php boven dit al komt.
Hiier doe je allemaal output
 
Tobias

Tobias

22/12/2004 17:05:00
Quote Anchor link
Inderdaad.
Het gaat hier om de pagina index.php, en als login.php ALS ONDERDEEL VAN index.php wordt aangeroepen is er als een helehoop output geweest.
Wat ik zou doen: (bovenaan pag)
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?
if(!$_GET['page'])
{

        $_GET['page'] = "home";
}


if(file_exists($_GET['page'].'.php'))
{

     ob_start();
     include($_GET['page'].'.php');
     $content = ob_get_content();
     ob_end_clean();
}

else { include("fout.php"); }

//einde pagina systeem
?>


en de $content var echoen op de plek waar 'ie hoort.
 
Sjefke

sjefke

22/12/2004 17:05:00
Quote Anchor link
dus bij inlog.php die code tussen
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<?php en ?>
tags boven index.php zetten? in de index.php bovenaan?
 
Tobias

Tobias

22/12/2004 17:08:00
Quote Anchor link
Die code (zonder
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? ?>
) in index.php en op de plaats waar 'ie eerst stond de content var echoen:
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<?php
//includes
include "includes/include.php";

if(!$_GET['page'])
{

        $_GET['page'] = "home";
}


if(file_exists($_GET['page'].'.php'))
{

     ob_start();
     include($_GET['page'].'.php');
     $content = ob_get_content();
     ob_end_clean();
}

else { include("fout.php"); }

echo "<html>";
echo "<head>";
echo "<LINK href='".$style."' type=text/css rel=stylesheet>";
echo "<title>".$titel."</title>";
echo "</head>";
echo "<BODY bgColor='#929292' background='".$achtergrond."'>";


echo "<DIV align='center'>";
echo "<a href='?page=home'><img border='0' src='http://www.thevissite.nl/computerplanet/img/v1/header.gif'></a>";
echo "<TABLE id='table1' cellPadding='0' width='860' border='0'>";
echo "<TBODY>";
echo "<TR>";
echo "<TD vAlign='top' bgColor='#e5e5e5'>";
echo "<TABLE id='table2' cellSpacing='0' cellPadding='5' width='160' border='0' height='256'>";
echo "<TBODY>";
echo "<TR>";
echo "<TD height='246' valign='top'>";


echo "<table border='0' width='100%' cellspacing='0' cellpadding='0'>";
echo "<tr>";
echo "<td width='100%' background='".$bgimage."' bgcolor='".$bgcoler."'><b>Menu</b></td>";
echo "</tr>";
echo "<tr>";
echo "<td width='100%'>";
include "menu/linksboven.php";
echo "</td>";
echo "</tr>";
echo "</table>";


echo "&nbsp;";


echo "<table border='0' width='100%' cellspacing='0' cellpadding='0'>";
echo "<tr>";
echo "<td width='100%' background='".$bgimage."' bgcolor='".$bgcoler."'><b>Leden</b></td>";
echo "</tr>";
echo "<tr>";
echo "<td width='100%'>";
include "menu/leden.php";
echo "</td>";
echo "</tr>";
echo "</table>";


echo "&nbsp;";


echo "<table border='0' width='100%' cellspacing='0' cellpadding='0'>";
echo "<tr>";
echo "<td width='100%' background='".$bgimage."' bgcolor='".$bgcoler."'><b>Overige</b></td>";
echo "</tr>";
echo "<tr>";
echo "<td width='100%'>";
include "menu/linksonder.php";
echo "</td>";
echo "</tr>";
echo "</table>";


echo "</TD></TR></TBODY></TABLE></TD>";
echo "<TD vAlign='top' bgColor='#efefef'>";
echo "<TABLE id='table8' cellSpacing='0' cellPadding='0' width='540' border='0'>";
echo "<TBODY>";
echo "<TR>";
echo "<TD vAlign='top' width='100%' bgColor='#e5e5e5' height='438'>";
echo "<DIV align='center'>";
echo "<TABLE id='table9' width='540' border='0'>";
echo "<TBODY>";
echo "<TR>";
echo "<TD class=content>";

echo($content);

echo "&nbsp;";


echo "</td></TR></TBODY></TABLE></DIV>";
echo "<DIV></DIV>";
echo "<DIV></DIV>";
echo "<DIV></DIV></TD><td valign='top' width='160' style='border-left: 1px solid #929292' bgcolor='#e5e5e5'>";
echo "<TABLE id='table2' cellSpacing='0' cellPadding='5' width='160' border='0'>";
echo "<tr>";
echo "<td>";


echo "<table border='0' width='100%' cellspacing='0' cellpadding='0'>";
echo "<tr>";
echo "<td width='100%' background='".$bgimage."' bgcolor='".$bgcoler."'><b>Nieuwe Topics</b></td>";
echo "</tr>";
echo "<tr>";
echo "<td width='100%'>";
include "menu/rechtsboven.php";
echo "</td>";
echo "</tr>";
echo "</table>";


echo "&nbsp;";


echo "<table border='0' width='100%' cellspacing='0' cellpadding='0'>";
echo "<tr>";
echo "<td width='100%' background='".$bgimage."' bgcolor='".$bgcoler."'><b>Linkpartners</b></td>";
echo "</tr>";
echo "<tr>";
echo "<td width='100%'>";
include "menu/rechtsonder.php";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "</td></tr></table></td></TR></TBODY></TABLE>";
echo "<DIV></DIV>";
echo "<TR>";
echo "<TD class=datumtijd style='BORDER-RIGHT: #929292 0px solid' vAlign='top' bgColor='#e5e5e5'> </TD>";
echo "<TD class=copyright style='BORDER-LEFT: #929292 0px solid' vAlign='top' bgColor='#e5e5e5'>";
echo "<center>";
include "includes/copy.php";
echo "</TD></TR>";
echo "</table></FORM>";
echo "</BODY>";
echo "</html>";
?>
 
Sjefke

sjefke

22/12/2004 17:12:00
Quote Anchor link
deze code werkt niet check http://www.thevissite.nl/computerplanet/ krijg je een error. wat is de oplossing weer iemand die?
 
Tobias

Tobias

22/12/2004 17:13:00
Quote Anchor link
Oh what a shame...
Mijn fout.
Het moet ob_get_contents() en niet ob_get_content() zijn.

Solly.
 
Sjefke

sjefke

22/12/2004 17:21:00
Quote Anchor link
nu werkt het bedankt
 
Sjefke

sjefke

22/12/2004 17:24:00
Quote Anchor link
function beveiligd() {
if ( !isset($_COOKIE['login'])){
header("location: ?page=leden/aanmelden");
}

zit een klein foutje. krijg elke keer de error.
Cannot redeclare beveiligd()

hoe krijg ik dat weg?
 
Tobias

Tobias

22/12/2004 17:27:00
Quote Anchor link
1- Je sluit de functie niet af met accolade (waarschijnlijk verkeerd gekopieerd)
2- Waarom in een functie? (zie ik de noodzaak niet van in)
3- Welke regel, welk bestand?
 
Sjefke

sjefke

22/12/2004 17:31:00
Quote Anchor link
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?
#sitegegevens
$sitenaam = "-";
$sitetitle = "-";
$naam = "Jeffrey R.";
$email = "-";
$maxpm = 50; //Maximaal aantal PB's in een inbox
$message = "".$_POST[naam]." heeft een mailtje gestuurt via uw site.\n\n Als opmerking had hij: ".$_POST[opmerking]."\n\nZijn email adres is: ".$_POST[email].".\n\n Met vriendelijke groeten Computer planet"; //bewerk dit naar je eigen message

#mysql gegevens

$host = "localhost";
$user = "user";
$pass = "***";
$db = "men db";

#verander hier verder niets
mysql_connect("$host","$user","$pass");
mysql_select_db("$db");
include("ubb.php");
$actie = $_GET["actie"];
$hours = 7;  
$datum = date('d/m/Y h:i', (time () + ($hours * 3600)));
function
beveiligd() {
    if ( !isset($_COOKIE['login'])){
    header("location: ?page=leden/aanmelden");
    }
}

?>


dit is config.php.
de error:
Fatal error: Cannot redeclare beveiligd() in /home/thevissi/public_html/computerplanet/leden/config.php on line 24


dit was het
 
Alfred -

Alfred -

22/12/2004 17:34:00
Quote Anchor link
Quote:
de error:
Fatal error: Cannot redeclare beveiligd() in /home/thevissi/public_html/computerplanet/leden/config.php on line 24


FAQ
 
Sjefke

sjefke

22/12/2004 17:40:00
Quote Anchor link
bedankt, heb het opgelost door de config te includen in index.php hoef dus nergens meer te doen..

Iedereen in dit topic bedankt voor het helpen
 

Pagina: « vorige 1 2



Overzicht Reageren

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.