小编nka*_*amm的帖子

PHP.延期.调用现有的PHP函数

所以我决定为php写一个扩展.一切似乎都很好,除非我遇到一个小问题.

php-5.4.9有源代码.有一个ext/standard/mail.c很棒的功能文件

PHPAPI int php_mail(char *to, char *subject, char *message, char *headers, char *extra_cmd TSRMLS_DC)
Run Code Online (Sandbox Code Playgroud)

在我的扩展中,acme.c我已经包括在内

...
#include "php.h"
#include "ext/standard/php_mail.h"
#include "php_ini.h"
...
Run Code Online (Sandbox Code Playgroud)

所以php_mail你感觉良好,工作正常.但是,显然,我想使用从mail.c第101行开始到189结束的代码(http://pastie.org/5444192 5-93对应的行中的代码).所以我抓住了自己的想法(虽然在某些方面很尴尬)为什么不打电话PHP_FUNCTION(mail)?到目前为止我找不到那些宏,实际上我想知道实现这个想法的最佳方法.

我内心的zend工程师(新手)建议我使用call_user_function

ZEND_API int call_user_function(HashTable *function_table, zval **object_pp, zval *function_name, zval *retval_ptr, zend_uint param_count, zval *params[] TSRMLS_DC);
Run Code Online (Sandbox Code Playgroud)

但我无法弄清楚如何称呼它.

这个问题!如何(非常欢迎mail函数的例子)调用由?定义的函数?PHP_FUNCTION

php c php-extension

19
推荐指数
1
解决办法
4097
查看次数

带有nginx SAML2的Google(G Suit)身份提供商

您可能会听到有关shibboleth及其解决方案的最佳解决方案(https://shibboleth.net/products/identity-provider.html),因此适用于服务提供商(例如nginx https://github.com/nginx-shib/) nginx-http-shibboleth).

众所周知,Google提供自己的SAML2 IDP,我们希望使用它:

nginx需要知道google的哪些用户才能继续使用网站.有可能在shibboleth的那一层做到这一点,但我很难找到谷歌的解决方案.

有人有想法吗?谢谢!

nginx shibboleth single-sign-on saml-2.0

7
推荐指数
1
解决办法
555
查看次数

标签 统计

c ×1

nginx ×1

php ×1

php-extension ×1

saml-2.0 ×1

shibboleth ×1

single-sign-on ×1