当前位置: 首页>>代码示例>>C++>>正文


C++ sapi_module_struct类代码示例

本文整理汇总了C++中sapi_module_struct的典型用法代码示例。如果您正苦于以下问题:C++ sapi_module_struct类的具体用法?C++ sapi_module_struct怎么用?C++ sapi_module_struct使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了sapi_module_struct类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

static int
php_apache_server_startup(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
{
	void *data = NULL;
	const char *userdata_key = "apache2hook_post_config";

	/* Apache will load, unload and then reload a DSO module. This
	 * prevents us from starting PHP until the second load. */
	apr_pool_userdata_get(&data, userdata_key, s->process->pool);
	if (data == NULL) {
		/* We must use set() here and *not* setn(), otherwise the
		 * static string pointed to by userdata_key will be mapped
		 * to a different location when the DSO is reloaded and the
		 * pointers won't match, causing get() to return NULL when
		 * we expected it to return non-NULL. */
		apr_pool_userdata_set((const void *)1, userdata_key, apr_pool_cleanup_null, s->process->pool);
		return OK;
	}

	/* Set up our overridden path. */
	if (apache2_php_ini_path_override) {
		apache2_sapi_module.php_ini_path_override = apache2_php_ini_path_override;
	}
#ifdef ZTS
	tsrm_startup(1, 1, 0, NULL);
	(void)ts_resource(0);
	ZEND_TSRMLS_CACHE_UPDATE;
#endif
	sapi_startup(&apache2_sapi_module);
	apache2_sapi_module.startup(&apache2_sapi_module);
	apr_pool_cleanup_register(pconf, NULL, php_apache_server_shutdown, apr_pool_cleanup_null);
	php_apache_add_version(pconf);

	return OK;
}
开发者ID:AmesianX,项目名称:php-src,代码行数:35,代码来源:sapi_apache2.c

示例2: php_apache_child_shutdown

static apr_status_t php_apache_child_shutdown(void *tmp)
{
	apache2_sapi_module.shutdown(&apache2_sapi_module);
#if defined(ZTS) && !defined(PHP_WIN32)
	tsrm_shutdown();
#endif
	return APR_SUCCESS;
}
开发者ID:SammyK,项目名称:php-src,代码行数:8,代码来源:sapi_apache2.c

示例3: php_apache_server_shutdown

static apr_status_t php_apache_server_shutdown(void *tmp)
{
	apache2_sapi_module.shutdown(&apache2_sapi_module);
	sapi_shutdown();
#ifdef ZTS
	tsrm_shutdown();
#endif
	return APR_SUCCESS;
}
开发者ID:SammyK,项目名称:php-src,代码行数:9,代码来源:sapi_apache2.c

示例4: webjames_php_init

int webjames_php_init(void)
/*called when WebJames initialises*/
{
	if (strcmp(configuration.webjames_h_revision,WEBJAMES_H_REVISION)!=0) {
		/*This file was compiled against a different revision of
		  webjames.h than webjames was, which could be bad news*/
		webjames_writelog(0,"PHP module is compiled for WebJames (%s) and was linked with a different version (%s)",WEBJAMES_H_REVISION,configuration.webjames_h_revision);
		return 0; /*failed to initialise*/
	}
	sapi_startup(&sapi_module);
	sapi_module.startup(&sapi_module);
	SG(server_context) = (void *) 1;
	return 1; /*initialised correctly*/
}
开发者ID:chosen1,项目名称:php-src,代码行数:14,代码来源:webjames.c

示例5: phpFinit

int phpFinit(lstTset * opt)
{
    php_core_globals *core_globals;

    tsrm_startup(128, 1, 0, NULL);
    core_globals = ts_resource(core_globals_id);

    logFmsg(0, "mod/php: PHP Interface v3 (module)");
    logFmsg(0, "mod/php: Copyright (c) 1999-2014 The PHP Group. All rights reserved.");

    sapi_startup(&capi_sapi_module);
    capi_sapi_module.startup(&capi_sapi_module);

    return STATUS_PROCEED;
}
开发者ID:slusarz,项目名称:php-src,代码行数:15,代码来源:capi.c

示例6: webjames_php_shutdown

void webjames_php_shutdown(void)
/*called when WebJames is about to quit*/
{
	sapi_module.shutdown(&sapi_module);
	sapi_shutdown();
}
开发者ID:chosen1,项目名称:php-src,代码行数:6,代码来源:webjames.c


注:本文中的sapi_module_struct类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。