static public function setCookie($name, $value, $expire='3600', $path=null, $domain=null, $secure=null, $httponly=null)
    {
        $expire = $expire ? time() + (is_numeric($expire) ? intval($expire) : intval(self::$COOKIE_EXPIRE)) : 0;
        if (empty($path))   $path = '/';
        if (empty($domain)) $domain = self::$COOKIE_DOMAIN ? self::$COOKIE_DOMAIN : UriHelper::GetRootDomain();
        $secure   = is_null($secure) ? static::$COOKIE_SECURE : (bool) $secure;
        $httponly = is_null($httponly) ? static::$COOKIE_HTTP_ONLY : (bool) $httponly;
        
        $name = static::$COOKIE_PREFIX . $name;
        $result = setcookie($name, $value, $expire, $path, $domain, $secure, $httponly);
        $_COOKIE[$name] = $value; 
    }
static public function setCookie($name, $value, $expire='3600', $path=null, $domain=null, $secure=null, $httponly=null)
    {
        $expire = $expire ? time() + (is_numeric($expire) ? intval($expire) : intval(self::$COOKIE_EXPIRE)) : 0;
        if (empty($path))   $path = '/';
        if (empty($domain)) $domain = self::$COOKIE_DOMAIN ? self::$COOKIE_DOMAIN : UriHelper::GetRootDomain();
        $secure   = is_null($secure) ? static::$COOKIE_SECURE : (bool) $secure;
        $httponly = is_null($httponly) ? static::$COOKIE_HTTP_ONLY : (bool) $httponly;
        
        $name = static::$COOKIE_PREFIX . $name;
        $result = setcookie($name, $value, $expire, $path, $domain, $secure, $httponly);
        $_COOKIE[$name] = $value; 
    }
static public function setCookie ( $ name , $ value , $ expire = '3600' , $ path = null , $ domain = null , $ secure = null , $ httponly = null ) { $ expire = $ expire ? time ( ) + ( is_numeric ( $ expire ) ? intval ( $ expire ) : intval ( self :: $ COOKIE_EXPIRE ) ) : 0 ; if ( empty ( $ path ) ) $ path = '/' ; if ( empty ( $ domain ) ) $ domain = self :: $ COOKIE_DOMAIN ? self :: $ COOKIE_DOMAIN : UriHelper :: GetRootDomain ( ) ; $ secure = is_null ( $ secure ) ? static :: $ COOKIE_SECURE : ( bool ) $ secure ; $ httponly = is_null ( $ httponly ) ? static :: $ COOKIE_HTTP_ONLY : ( bool ) $ httponly ; $ name = static :: $ COOKIE_PREFIX . $ name ; $ result = setcookie ( $ name , $ value , $ expire , $ path , $ domain , $ secure , $ httponly ) ; $ _COOKIE [ $ name ] = $ value ; }
set cookie, need think cross domain.
@param  string  $name        cookie 名
@param  string  $value       cookie 值
@param  int     $expire      cookie 有效期，单位秒
@param  string  $path        cookie 服务器路径 默认为 /
@param  string  $domain      cookie 域名
@param  boolean $secure      是否通过安全的 HTTPS 连接来传输 cookie,默认为false
@param  boolean $httponly    是否仅用于http
@return void
set cookie need think cross domain .