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

软件著作权-源代码范本

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

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

25

type, const char *format, ...) { char *params; va_list args; spprintf(¶ms, 0, \ va_start(args, format); php_verror(docref, params ? params : \ va_end(args); if (params) { efree(params); } }

/* }}} */

/* {{{ php_html_puts */

PHPAPI void php_html_puts(const char *str, uint size TSRMLS_DC) { zend_html_puts(str, size TSRMLS_CC); }

/* }}} */

/* {{{ php_suppress_errors */

PHPAPI void php_set_error_handling(error_handling_t error_handling, zend_class_entry *exception_class TSRMLS_DC) { PG(error_handling) = error_handling; PG(exception_class) = exception_class; if (PG(last_error_message)) { free(PG(last_error_message)); PG(last_error_message) = NULL; } if (PG(last_error_file)) { free(PG(last_error_file)); PG(last_error_file) = NULL; } PG(last_error_lineno) = 0; }

/* }}} */

/* {{{ php_error_cb

extended error handling function */

static void php_error_cb(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args) { char *buffer; int buffer_len, display; TSRMLS_FETCH(); buffer_len = vspprintf(&buffer, PG(log_errors_max_len), format, args); /* check for repeated errors to be ignored */ if (PG(ignore_repeated_errors) && PG(last_error_message)) { /* no check for PG(last_error_file) is needed since it cannot * be NULL if PG(last_error_message) is not NULL */ if (strcmp(PG(last_error_message), buffer) || (!PG(ignore_repeated_source) && ((PG(last_error_lineno) != (int)error_lineno)

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

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