I'm using the following code:
if (!$lRet):
// Volta para o cartão eletrônico.
header('Location: '.$_SESSION['CFG_DIR_ROOT'].'index.php');
endif;
In this way it simply does not work and continues to run the script, but if we include a line of code below header () it works.
if (!$lRet):
// Volta para o cartão eletrônico.
header('Location: '.$_SESSION['CFG_DIR_ROOT'].'index.php');
die();
endif;
This works, that is, it goes to index.php and does not execute die (). If I replace die () [exit () also works] with another echo type or $ a = 'b', etc., it also does not work.
What's the magic?
Today I will try to run on another server, this time Linux, to see if I have different operation or some error message. Then put the result here.