dimanche 6 mai 2018

the little bit another "cannot modify header" [duplicate]

This question already has an answer here:

Before you mark my question as a duplicate I want that you guys read my whole question because, believe me or not, I tried alot and could not find any solutions.
Problem
I got on my webbrowser the following error displayed:

Warning: Cannot modify header information - headers already sent by (output started at /users/zsername/www/index.php:39) in /users/username/www/blood.php on line 45

Until here nothing special.
What I´ve done
I searched on solutions and many people say:
A) remove spaces
B) set on top of the file
C) set coding on ANSI

In my case I can not do point B because the include is in middle of the file.
Here is what I mean:

index.php:

                <!-- Intro -->
                    <section id="intro" class="wrapper style1 fullscreen fade-up">
                        <div class="inner">
Line 39: <?php include ('blood.php');?>
                            <ul class="actions">
                            </ul>
                        </div>
                    </section>

blood.php

if($query1)
{
Line 45 header("Location:http://localhost/dash/blood.php");
 ob_end_flush();
    die();

So how can I handle this error?
If there is the solution for exact this situation (php in middle of file) then mark it as duplicate, because I could not find the same scenarion on one of these questions.

As mentioned it cant be a duplicate of tht because there they talk about point A - C which does not work on me!

Kind regards
user123




Aucun commentaire:

Enregistrer un commentaire