好文档 - 专业文书写作范文服务资料分享网站

软件著作权-源代码范本

天下 分享 时间: 加入收藏 我要投稿 点赞

天一博胜企业管理软件V1.0 源代码

16

#endif

#include \

#include \#if PHP_SIGCHILD #include #include #endif

#include \#include \#include \#include \#include \#include \

#include \#include \#include \#include \

#include \#include \#include \/* }}} */ #ifndef ZTS

php_core_globals core_globals; #else

PHPAPI int core_globals_id; #endif

#define SAFE_FILENAME(f) ((f)?(f):\/* {{{ PHP_INI_MH */

static PHP_INI_MH(OnSetPrecision) { int i = atoi(new_value); if (i >= 0) { EG(precision) = i; return SUCCESS; } else { return FAILURE; } }

static PHP_INI_MH(OnChangeMemoryLimit) { if (new_value) { PG(memory_limit) = zend_atoi(new_value, new_value_length); } else { PG(memory_limit) = 1<<30; /* effectively, no limit */ } return zend_set_memory_limit(PG(memory_limit)); }

static void php_disable_functions(TSRMLS_D) { char *s = NULL, *e; if (!*(INI_STR(\

天一博胜企业管理软件V1.0 源代码

17

return; } e = PG(disable_functions) = strdup(INI_STR(\ while (*e) { switch (*e) { case ' ': case ',': if (s) { *e = '\\0'; zend_disable_function(s, e-s TSRMLS_CC); s = NULL; } break; default: if (!s) { s = e; } break; } e++; } if (s) { zend_disable_function(s, e-s TSRMLS_CC); } }

static void php_disable_classes(TSRMLS_D) { char *s = NULL, *e; if (!*(INI_STR(\ return; } e = PG(disable_classes) = strdup(INI_STR(\ while (*e) { switch (*e) { case ' ': case ',': if (s) { *e = '\\0'; zend_disable_class(s, e-s TSRMLS_CC); s = NULL; } break; default: if (!s) { s = e; } break; } e++; } if (s) { zend_disable_class(s, e-s TSRMLS_CC);

天一博胜企业管理软件V1.0 源代码

} }

static PHP_INI_MH(OnUpdateTimeout) { EG(timeout_seconds) = atoi(new_value); if (stage==PHP_INI_STAGE_STARTUP) { /* Don't set a timeout on startup, only per-request */ return SUCCESS; } zend_unset_timeout(TSRMLS_C); zend_set_timeout(EG(timeout_seconds)); return SUCCESS; }

static int php_get_display_errors_mode(char *value, int value_length) { int mode; if (!value) { return PHP_DISPLAY_ERRORS_STDOUT; } if (value_length == 2 && !strcasecmp(\ mode = PHP_DISPLAY_ERRORS_STDOUT; } else if (value_length == 3 && !strcasecmp(\ mode = PHP_DISPLAY_ERRORS_STDOUT; } else if (value_length == 4 && !strcasecmp(\ mode = PHP_DISPLAY_ERRORS_STDOUT; } else if (value_length == 6 && !strcasecmp(value, \ mode = PHP_DISPLAY_ERRORS_STDERR; } else if (value_length == 6 && !strcasecmp(value, \ mode = PHP_DISPLAY_ERRORS_STDOUT; } else { mode = atoi(value); if (mode && mode != PHP_DISPLAY_ERRORS_STDOUT && mode PHP_DISPLAY_ERRORS_STDERR) { mode = PHP_DISPLAY_ERRORS_STDOUT; } } return mode; }

static PHP_INI_MH(OnUpdateDisplayErrors) { PG(display_errors) = (zend_bool) php_get_display_errors_mode(new_value, new_value_length); return SUCCESS; }

static PHP_INI_DISP(display_errors_mode) { int mode, tmp_value_length, cgi_or_cli; char *tmp_value; TSRMLS_FETCH(); if (type == ZEND_INI_DISPLAY_ORIG && ini_entry->modified) { tmp_value = (ini_entry->orig_value ? ini_entry->orig_value : NULL ); tmp_value_length = ini_entry->orig_value_length; } else if (ini_entry->value) {

18

!=

天一博胜企业管理软件V1.0 源代码

19

tmp_value = ini_entry->value; tmp_value_length = ini_entry->value_length; } else { tmp_value = NULL; tmp_value_length = 0; } mode = php_get_display_errors_mode(tmp_value, tmp_value_length); cgi_or_cli = (!strcmp(sapi_module.name, \ switch (mode) { case PHP_DISPLAY_ERRORS_STDERR: if (cgi_or_cli ) { PUTS(\ } else { PUTS(\ } break; case PHP_DISPLAY_ERRORS_STDOUT: if (cgi_or_cli ) { PUTS(\ } else { PUTS(\ } break; default: PUTS(\ break; } }

static PHP_INI_MH(OnUpdateErrorLog) { /* Only do the safemode/open_basedir check at runtime */ if ((stage == PHP_INI_STAGE_RUNTIME || stage == PHP_INI_STAGE_HTACCESS) && strcmp(new_value, \ if (PG(safe_mode) && (!php_checkuid(new_value, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { return FAILURE; } if (PG(open_basedir) && php_check_open_basedir(new_value TSRMLS_CC)) { return FAILURE; } } OnUpdateString(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC); return SUCCESS; }

static PHP_INI_MH(OnChangeMailForceExtra) { /* Don't allow changing it in htaccess */ if (stage == PHP_INI_STAGE_HTACCESS) { return FAILURE; } return SUCCESS; }

天一博胜企业管理软件V1.0 源代码

20

#ifndef PHP_SAFE_MODE_EXEC_DIR

# define PHP_SAFE_MODE_EXEC_DIR \#endif

#if defined(PHP_PROG_SENDMAIL) && !defined(NETWARE)

# define DEFAULT_SENDMAIL_PATH PHP_PROG_SENDMAIL \#elif defined(PHP_WIN32)

# define DEFAULT_SENDMAIL_PATH NULL #else

# define DEFAULT_SENDMAIL_PATH \ #endif

PHPAPI void php_log_err(char *log_message TSRMLS_DC) { int fd = -1; char error_time_str[128]; struct tm tmbuf; time_t error_time; /* Try to use the specified logging location. */ if (PG(error_log) != NULL) { #ifdef HAVE_SYSLOG_H if (!strcmp(PG(error_log), \ php_syslog(LOG_NOTICE, \ return; } #endif fd = VCWD_OPEN_MODE(PG(error_log), O_CREAT | O_APPEND | O_WRONLY, 0644); if (fd != -1) { char *tmp; int len; time(&error_time); strftime(error_time_str, sizeof(error_time_str), \%H:%M:%S\php_localtime_r(&error_time, &tmbuf)); len = spprintf(&tmp, 0, \#ifdef PHP_WIN32 php_flock(fd, 2); #endif write(fd, tmp, len); efree(tmp); close(fd); return; } } /* Otherwise fall back to the default logging location, if we have one */ if (sapi_module.log_message) { sapi_module.log_message(log_message); } }

PHPAPI int php_write(void *buf, uint size TSRMLS_DC) { return PHPWRITE(buf, size); }

/* }}} */

/* {{{ php_printf

软件著作权-源代码范本

天一博胜企业管理软件V1.0源代码16#endif#include\#include\#ifPHP_SIGCHILD#include#include#endif#include\#include\#include\#include\#
推荐度:
点击下载文档文档为doc格式
40cjl7rxwz9gaia48888
领取福利

微信扫码领取福利

微信扫码分享