专注于互联网--专注于架构

最新标签
网站地图
文章索引
Rss订阅

首页 »PHP教程 » postgetphp:PHP的GET/POST等大变量生成过程 »正文

postgetphp:PHP的GET/POST等大变量生成过程

来源: 发布时间:星期二, 2008年12月30日 浏览:60次 评论:0
· 作者:laruence(思路方法研究) :

zend_bool
php_auto_globals_create_request(char*name,u
name_len
TSRMLS_DC)
{
zval*form_variables;
   unsigned
char
_gpc_flags[3]={0,0,0};
   char*p;

   ALLOC_ZVAL(form_variables);
   .gif' />_init(form_variables);
   INIT_PZVAL(form_variables);

   for
(p=PG(variables_order);p&& *p;p)
{
switch
(*p)
{
'g':
            'G':
               
(!_gpc_flags[0])
{
php_autoglobal_merge(Z_ARRVAL_P(form_variables),Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_GET])
TSRMLS_CC);
                    _gpc_flags[0]=1;
               }
;                                                                                                                    'p':
            'P':
               
(!_gpc_flags[1])
{
php_autoglobal_merge(Z_ARRVAL_P(form_variables),Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_POST])
TSRMLS_CC);
                    _gpc_flags[1]=1;
               }
;
            'c':
            'C':                                                                                                                        
(!_gpc_flags[2])
{
php_autoglobal_merge(Z_ARRVAL_P(form_variables),Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_COOKIE])
TSRMLS_CC);
                    _gpc_flags[2]=1;
               }
;
        }
}
zend_hash_update(&EG(symbol_table),"_REQUEST",("_REQUEST"), &form_variables,(zval*),NULL);
   
0;
} TAG: get PHP post POST 变量 GET


0

相关文章

读者评论

发表评论

  • 昵称:
  • 内容: