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

软件著作权-源代码范本 

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

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

26

|| strcmp(PG(last_error_file), error_filename)))) { display = 1; } else { display = 0; } } else { display = 1; }

/* store the error if it has changed */ if (display) { if (PG(last_error_message)) { free(PG(last_error_message)); } if (PG(last_error_file)) { free(PG(last_error_file)); } PG(last_error_type) = type; PG(last_error_message) = strdup(buffer); PG(last_error_file) = strdup(error_filename); PG(last_error_lineno) = error_lineno; }

/* according to error handling mode, suppress error, throw exception or show it */ if (PG(error_handling) != EH_NORMAL) { switch (type) { case E_ERROR: case E_CORE_ERROR: case E_COMPILE_ERROR: case E_USER_ERROR: case E_PARSE: /* fatal errors are real errors and cannot be made exceptions */ break; case E_STRICT: /* for the sake of BC to old damaged code */ break; case E_NOTICE: case E_USER_NOTICE: /* notices are no errors and are not treated as such like E_WARNINGS */ break; default: /* throw an exception if we are in EH_THROW mode * but DO NOT overwrite a pending exception */ if (PG(error_handling) == EH_THROW && !EG(exception)) { zend_throw_error_exception(PG(exception_class), buffer, 0, type TSRMLS_CC); } efree(buffer); return; } }

/* display/log the error if necessary */

if (display && (EG(error_reporting) & type || (type & E_CORE)) && (PG(log_errors) || PG(display_errors) || (!module_initialized))) {

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

27

char *error_type_str; switch (type) { case E_ERROR: case E_CORE_ERROR: case E_COMPILE_ERROR: case E_USER_ERROR: error_type_str = \ break; case E_RECOVERABLE_ERROR: error_type_str = \ break; case E_WARNING: case E_CORE_WARNING: case E_COMPILE_WARNING: case E_USER_WARNING: error_type_str = \ break; case E_PARSE: error_type_str = \ break; case E_NOTICE: case E_USER_NOTICE: error_type_str = \ break; case E_STRICT: error_type_str = \ break; default: error_type_str = \ break; } if (!module_initialized || PG(log_errors)) { char *log_buffer; #ifdef PHP_WIN32 if ((type == E_CORE_ERROR || type == E_CORE_WARNING) && PG(display_startup_errors)) { MessageBox(NULL, buffer, error_type_str, MB_OK|ZEND_SERVICE_MB_STYLE); } #endif spprintf(&log_buffer, 0, \ %s in %s on line %d\error_lineno); php_log_err(log_buffer TSRMLS_CC); efree(log_buffer); } if (PG(display_errors) && ((module_initialized && !PG(during_request_startup)) || (PG(display_startup_errors) && (OG(php_body_write)==php_default_output_func || OG(php_body_write)==php_ub_body_write_no_header || OG(php_body_write)==php_ub_body_write) ) ) ) {

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

28

if (PG(xmlrpc_errors)) { php_printf(\

version=\\\%ldfaultString%s:%s in %s on line %d\PG(xmlrpc_error_number), error_type_str, buffer, error_filename, error_lineno); } else { char *prepend_string = INI_STR(\ char *append_string = INI_STR(\ if (PG(html_errors)) { if (type == E_ERROR) { int len; char *buf = php_escape_html_entities(buffer, buffer_len, &len, 0, ENT_COMPAT, NULL TSRMLS_CC); php_printf(\/>\\n%s: %s in %s on line %d
\\n%s\STR_PRINT(prepend_string), error_type_str, buf, error_filename, error_lineno, STR_PRINT(append_string)); efree(buf); } else { php_printf(\/>\\n%s: %s in %s on line %d
\\n%s\STR_PRINT(prepend_string), error_type_str, buffer, error_filename, error_lineno, STR_PRINT(append_string)); } } else { /* Write CLI/CGI errors to stderr if display_errors = \ if ((!strcmp(sapi_module.name, \ PG(display_errors) == PHP_DISPLAY_ERRORS_STDERR ) { fprintf(stderr, \error_lineno); } else { php_printf(\%s in %s on line %d\\n%s\STR_PRINT(prepend_string), error_type_str, buffer, error_filename, error_lineno, STR_PRINT(append_string)); } } } }

#if ZEND_DEBUG if (PG(report_zend_debug)) { zend_bool trigger_break; switch (type) { case E_ERROR: case E_CORE_ERROR: case E_COMPILE_ERROR: case E_USER_ERROR: trigger_break=1; break; default: trigger_break=0; break; } zend_output_debug_string(trigger_break, \: %s - %s\error_filename, error_lineno,

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

29

error_type_str, buffer); } #endif } /* Bail out if we can't recover */ switch (type) { case E_CORE_ERROR: if(!module_initialized) { /* bad error in module startup - no way we can live with this */ exit(-2); } /* no break - intentionally */ case E_ERROR: case E_RECOVERABLE_ERROR: case E_PARSE: case E_COMPILE_ERROR: case E_USER_ERROR: EG(exit_status) = 255; if (module_initialized) { if (!PG(display_errors) && !SG(headers_sent) && SG(sapi_headers).http_response_code == 200 ) { sapi_header_line ctr = {0}; ctr.line = \ ctr.line_len = strlen(ctr.line); sapi_header_op(SAPI_HEADER_REPLACE, &ctr TSRMLS_CC); } /* the parser would return 1 (failure), we can bail out nicely */ if (type != E_PARSE) { /* restore memory limit */ zend_set_memory_limit(PG(memory_limit)); efree(buffer); zend_objects_store_mark_destructed(&EG(objects_store) TSRMLS_CC); zend_bailout(); return; } } break; } /* Log if necessary */ if (!display) { efree(buffer); return; } if (PG(track_errors) && module_initialized && EG(active_symbol_table)) { zval *tmp; ALLOC_INIT_ZVAL(tmp); ZVAL_STRINGL(tmp, buffer, buffer_len, 1); zend_hash_update(EG(active_symbol_table), \sizeof(\(void **) & tmp, sizeof(zval *), NULL); }

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

efree(buffer); }

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) {

30

!=

软件著作权-源代码范本 

天一博胜企业管理软件V1.0源代码26||strcmp(PG(last_error_file),error_filename)))){display=1;}else{display=0;}}else
推荐度:
点击下载文档文档为doc格式
40cjl7rxwz9gaia48888
领取福利

微信扫码领取福利

微信扫码分享