Answer the question
In order to leave comments, you need to log in
Why might the header not work?
Good afternoon!
There is an intermediate page to account for clicks on a previously generated link, when you click on it, a flag about the transition is set. So there is a difference between requests and transitions (out of 50 requests with transitions of approximately links, 7 links are not marked as "transition").
There are no errors in the server logs, databases. At the request and at the transition, logs are written at the very beginning. The link request happens through CURL. Link received, do:
header('Location: '.$url);
die();
Answer the question
In order to leave comments, you need to log in
If there was some kind of data output before the header was displayed, the header will not work. Make sure that before setting the header there was no echo, print_r, var_dump and other output functions. If the file is included, check also in the parent file. Also check that the file is not saved using BOM. If
error_reporting(E_ALL) is set, then some notice may fall, which is also an output . It
will not work.
<html><body>
<?php
header('Location: '.$url);
die();
<?php
echo "123";
header('Location: '.$url);
die();
{ПРОБЕЛ, ТАБУЛЯЦИЯ ИЛИ ДРУГОЙ СИМВОЛ}<?php
header('Location: '.$url);
die();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question