Warning: Cannot modify header information - headers already sent by (output started

Started on the old forum in January 2018 · view the original in the archive · old links redirect here

#mobile-chat #php #wml

4 replies · 87 views · started 8 years ago · 1 min read

3 participants
aznoorali Newbie · 3 posts #1

Please fix my code MobileChat

$status=file('../text/bannames.txt'); for ($ri=0; $ri<count($status); $ri++) { $resultban=rtrim($status[$ri]);

if($nimi=="$resultban"){$admin="5";} } if($admin=="5"){ header ('Location: ../tools/yourbanned.php');}

$status=file('../text/bootnames.txt'); for ($ri=0; $ri<count($status); $ri++) { $resultboot=rtrim($status[$ri]);

if($nimi=="$resultboot"){$admin="6";} } if($admin=="6"){ header ('Location: ../tools/yourbooted.php?nimi=$nimi');} $status=file('../text/bannames.txt'); for ($ri=0; $ri<count($status); $ri++) {

$resultipban=rtrim($status[$ri]);

if($nimi=="$resultipban"){$admin="8";} } if($admin=="8"){ header ('Location: ../tools/yourbanned.php');}

something else Fellow · 2,296 posts #2

There is missing code you are not showing which is where the problem is to. It could be as simple as a space before opening php:

[Space here]<?php

or maybe you have opened html before the header is given:

<html>
<?php 
header ('Location: ../tools/yourbanned.php');
?>

(header must come before all html)

aznoorali Newbie · 3 posts #3

yes.. i've show the <?php end >? and no white space.. but still error header..

something else Fellow · 2,296 posts #4

Is there an included page? ..... or is this page included from a different page?

tupac Developer · 95 posts #5

Doesn't the error specify which line is having the error?

Write your reply now; next you create a free account (or sign in) and it is posted right away. 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