Mixing Location and Cookie headers has always been hit and miss...
I think you could fix it with session_write_close() or you could just
replace the Location: with:
require 'b.php';
since you are just wasting HTTP connections the way you have it now...
On Sat, December 30, 2006 12:56 pm, tedd
Hi gang:
I have a small php script that behaves differently depending upon
who's calling it. The code is:
?php session_start(); /* a.php */
ob_start();
$_SESSION['var'] = test;
ob_clean();
header(Location: http://www.example.com/b.php;); /* Redirect browser */
exit;?
On Saturday 30 December 2006 18:56, tedd wrote:
Why can't the php script redirect the browser when called via ajax ?
The browser will not be expecting a page back, and will ignore headers.
Just some quick suggestion code, this isn't tested (except createRequest -
I use that all the time)...
At 12/30/2006 10:56 AM, tedd wrote:
Why can't the php script redirect the browser when called via ajax ?
Ajax is giving PHP control over just that byte-stream that ajax is
receiving and perhaps inserting into the page, not the full page itself.
Say you use javascript to set the src of an
At 12:55 PM -0800 12/30/06, Paul Novitski wrote:
At 12/30/2006 10:56 AM, tedd wrote:
Why can't the php script redirect the browser when called via ajax ?
Ajax is giving PHP control over just that byte-stream that ajax is
receiving and perhaps inserting into the page, not the full page
On Saturday 30 December 2006 18:56, tedd wrote:
Why can't the php script redirect the browser when called via ajax ?
The browser will not be expecting a page back, and will ignore headers. The
response must be handled by a function you define.
For the sake of a quick demo, if your php accepts
6 matches
Mail list logo