0
Next, I created a page to edit a piece of content and I would like it to go back to the previous page when I click the refresh button. I’m using the following command:
header("Location: visualizarNovaPrevisao.php");
However, a warning appears:
Warning: Cannot Modify header information - headers already sent by (output Started at C: Program Files (x86) Vertrigoserv www marco php editaNovaPrevisao.php:276) in
I’ve read about that warning, but I don’t understand what they say about output on line 276. Does anyone know how to use redirect?
This is typical of when there is some space after the closure of tag
?>
– Franchesco
What do you mean? When a space is left after closing the php tag? But there is no way to have space! Unless you mean space of the following form ? >, this?
– GustavoSevero
Take a look at item 3 of Otto’s answer. That’s what I’ve been meaning to say. It’s even advisable to not even put the tag PHP closure, just to avoid this problem.
– Franchesco
From a look at the wiki of the php tag there are two answers about this error.
– rray
On wikipedia, @lost?
– GustavoSevero
No, when you click on the language tag it opens the questions and a tab called
info
there generally has various information like list of resources, common problems etc. tag link The content about the error is at the end of the page.– rray
Sorry @lost, I don’t understand yet.
– GustavoSevero
@Gustavosevero which part you didn’t understand?
– rray
Gustavo, every tag on this site has a wiki: http://answall.com/tags/php/info
– brasofilo