Php zend_调用带有参数的方法
PHP扩展开发中有Php zend_调用带有参数的方法,php,c,php-extension,zend-framework,Php,C,Php Extension,Zend Framework,PHP扩展开发中有zend\u call\u method\u with_0_params,zend\u call\u method\u with_1_params和zend\u call\u method\u with_2_params 但是如何使用两个以上的参数调用方法?我以前的答案是错误的。您必须直接使用zend_call_函数。见正文。基本上,您必须首先准备一个zend\u fcall\u info对象。参数的数量应该存储在fci.param_count字段中,fci.params应该有
zend\u call\u method\u with_0_params
,zend\u call\u method\u with_1_params
和zend\u call\u method\u with_2_params
但是如何使用两个以上的参数调用方法?我以前的答案是错误的。您必须直接使用zend_call_函数。见正文。基本上,您必须首先准备一个
zend\u fcall\u info
对象。参数的数量应该存储在fci.param_count
字段中,fci.params
应该有一个带有fci.param_count
元素的数组。我想你不能。您应该使用get请求。url的构建方式如下:http://example.com/param1/param2/get_name1/get_value1/get_name2/get_value2
不幸的是,我必须调用parent::\u construct
方法,该方法接受3个参数并获取请求,但没有帮助,因为parent类是标准的异常。