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

计算机软件著作权登记-源代码范本 

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

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

31

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; }

#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

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

32

# 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 */

PHPAPI int php_printf(const char *format, ...) { va_list args; int ret; char *buffer; int size; TSRMLS_FETCH();

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

33

va_start(args, format); size = vspprintf(&buffer, 0, format, args); ret = PHPWRITE(buffer, size); efree(buffer); va_end(args); return ret; }

/* }}} */

/* {{{ php_verror helpers */

/* {{{ php_during_module_startup */

static int php_during_module_startup(void) { return module_startup; }

static int php_during_module_shutdown(void) { return module_shutdown; }

PHPAPI void php_verror(const char *docref, const char *params, int type, const char *format, va_list args TSRMLS_DC) { char *buffer = NULL, *docref_buf = NULL, *target = NULL; char *docref_target = \ char *p; int buffer_len = 0; char *space; char *class_name = get_active_class_name(&space TSRMLS_CC); char *function; int origin_len; char *origin; char *message; int is_function = 0; /* get error text into buffer and escape for html if necessary */ buffer_len = vspprintf(&buffer, 0, format, args); if (PG(html_errors)) { int len; char *replace = php_escape_html_entities(buffer, buffer_len, &len, 0, ENT_COMPAT, NULL TSRMLS_CC); efree(buffer); buffer = replace; buffer_len = len; } /* which function caused the problem if any at all */ if (php_during_module_startup()) { function = \ } else if (php_during_module_shutdown()) { function = \ } else if (EG(current_execute_data) && EG(current_execute_data)->opline && EG(current_execute_data)->opline->opcode == ZEND_INCLUDE_OR_EVAL ) { switch (EG(current_execute_data)->opline->op2.u.constant.value.lval) {

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

34

case ZEND_EVAL: function = \ is_function = 1; break; case ZEND_INCLUDE: function = \ is_function = 1; break; case ZEND_INCLUDE_ONCE: function = \ is_function = 1; break; case ZEND_REQUIRE: function = \ is_function = 1; break; case ZEND_REQUIRE_ONCE: function = \ is_function = 1; break; default: function = \ } } else { function = get_active_function_name(TSRMLS_C); if (!function || !strlen(function)) { function = \ } else { is_function = 1; } } if (is_function) { origin_len = spprintf(&origin, 0, \ } else { origin_len = spprintf(&origin, 0, \ } if (PG(html_errors)) { int len; char *replace = php_escape_html_entities(origin, origin_len, &len, 0, ENT_COMPAT, NULL TSRMLS_CC); efree(origin); origin = replace; } if (docref && docref[0] == '#') { docref_target = strchr(docref, '#'); docref = NULL; } if (!docref && is_function) { if (space[0] == '\\0') { spprintf(&docref_buf, 0, \ } else { spprintf(&docref_buf, 0, \

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

35

} while((p = strchr(docref_buf, '_')) != NULL) { *p = '-'; } docref = docref_buf; } if (docref && is_function && (PG(html_errors) || strlen(PG(docref_root)))) { if (strncmp(docref, \ /* We don't have 'http://' so we use docref_root */ char *ref; /* temp copy for duplicated docref */ docref_root = PG(docref_root); ref = estrdup(docref); if (docref_buf) { efree(docref_buf); } docref_buf = ref; /* strip of the target if any */ p = strrchr(ref, '#'); if (p) { target = estrdup(p); if (target) { docref_target = target; *p = '\\0'; } } /* add the extension if it is set in ini */ if (PG(docref_ext) && strlen(PG(docref_ext))) { spprintf(&docref_buf, 0, \ efree(ref); } docref = docref_buf; } /* display html formatted or only show the additional links */ if (PG(html_errors)) { spprintf(&message, 0, \[%s]: %s\origin, docref_root, docref, docref_target, docref, buffer); } else { spprintf(&message, 0, \ } if (target) { efree(target); } } else { spprintf(&message, 0, \ } efree(origin); if (docref_buf) { efree(docref_buf); } if (PG(track_errors) && module_initialized && EG(active_symbol_table) && (!EG(user_error_handler) || !(EG(user_error_handler_error_reporting) & type))) { zval *tmp;

计算机软件著作权登记-源代码范本 

天一博胜企业管理软件V1.0源代码31switch(mode){casePHP_DISPLAY_ERRORS_STDERR:if(cgi_or_cli){PUTS(\}else{PUTS(\}break;casePHP_DISPLAY_ERRORS_STDOUT:i
推荐度:
点击下载文档文档为doc格式
9zen00osup2nsft0jg7s
领取福利

微信扫码领取福利

微信扫码分享