Welcome Guest, Not a member yet? Register   Sign In
why does manually setting $_COOKIE not work (for using Flash upload utility)
#1

[eluser]Chillahan[/eluser]
I am trying to use this Flash upload utility:

http://www.element-it.com/multiple-file-...oader.aspx

It seems great, even supposedly reads the cookies set and passes them in a POST input. So it comes with this sample code. I've tried putting it in the index bootstrap file, but it still doesn't seem to work.

Code:
if(isset($_POST['MultiPowUpload_browserCookie']))
{
    $cookies = explode(";", $_POST['MultiPowUpload_browserCookie']);
    foreach($cookies as $value)
    {
        $namevalcookies = explode("=", $value);
        $browsercookie[trim($namevalcookies[0])] =  trim($namevalcookies[1]);
    }
    $_COOKIE = $browsercookie;
}

Looking in Session library, it does this:

Code:
$session = $this->CI->input->cookie($this->sess_cookie_name);

And all that does is this:

Code:
function cookie($index = '', $xss_clean = FALSE)
{
    return $this->_fetch_from_array($_COOKIE, $index, $xss_clean);
}

So why wouldn't this simple solution of re-writing $_COOKIE in the bootstrap when that special POST field is set work? I know it's getting to the if condition. Next I'll try e-mailing the value it's setting to see what it's getting.


Messages In This Thread
why does manually setting $_COOKIE not work (for using Flash upload utility) - by El Forum - 07-04-2011, 08:47 AM



Theme © iAndrew 2016 - Forum software by © MyBB