Re: header() not working with a http_response_code

From: Date: Tue, 05 May 2020 11:01:03 +0000
Subject: Re: header() not working with a http_response_code
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-327135@lists.php.net to get a copy of this message
Can you give an example header call that is not working for you? piektd., 2020. g. 1. maijs, plkst. 12:20 — lietotājs Lester Caine (< lester@lsces.uk>) rakstīja: > My framework is using header() to redirect when an invalid page is hit, > with the http_response_code providing the reason. This stopped working > some time back and I had assumed it was just a problem with 'extra > space' which I had not tracked down, but now I've eliminated that > possibility ( and corrected a couple of smarty files ) I'm still just > getting a blank screen! > > The problem seems to be the addition of $pStatusCode in header() ... > have dropped that so header only uses the Url and things are are least > redirecting. I suspect this is something to do with PHP changes as I'm > currently using PHP7.2 and still keep hitting things which need to be > reworked from the PHP5 base but I can't see any notes about this being > changed in PHP ... what am I missing? > > -- > Lester Caine - G8HFL > ----------------------------- > Contact - https://lsces.uk/wiki/Contact > L.S.Caine Electronic Services - https://lsces.uk > Model Engineers Digital Workshop - https://medw.uk > Rainbow Digital Media - https://rainbowdigitalmedia.uk >

« previous php.general (#327135) next »