第一范文网 - 专业文章范例文档资料分享平台

软件著作权-源代码范本

来源:用户分享 时间:2025/5/17 4:45:21 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

天一博胜企业管理软件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

搜索更多关于: 软件著作权-源代码范本 的文档
软件著作权-源代码范本.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c40cjl7rxwz9gaia48888_4.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top