There are such scripts that process data, and then you need to return to the previous page, do through
public static function goback () {
If (@ $ _ Server ['http_referer']! = null) {
Header ("Location:". $ _ Server ['http_referer']);
}
Sys :: gohome ();
}
But always triggers SYS :: gohome ();
What can be wrong here?
Answer 1, Authority 100%
found,
if (...) {
Header ("Location:". $ _ Server ['http_referer']);
}
Sys :: gohome ();
It turns out after header ()
, execution continues, it was necessary to write via ELSE
Answer 2
Try to use after the header function ($ ST);
Function Function PHP Script EXIT ();