コード例 #1
0
ファイル: info.c プロジェクト: practicalweb/php-src
static int php_info_uprint_html_esc(const UChar *str, int len) /* {{{ */
{
    UErrorCode status = U_ZERO_ERROR;
    char *new_str = NULL;
    int new_len, written;
    TSRMLS_FETCH();

    zend_unicode_to_string_ex(UG(utf8_conv), &new_str, &new_len, str, len, &status);
    if (U_FAILURE(status)) {
        return 0;
    }
    written = php_info_print_html_esc(new_str, new_len);
    efree(new_str);
    return written;
}
コード例 #2
0
ファイル: info.c プロジェクト: PeeHaa/php-src
static void php_info_print_stream_hash(const char *name, HashTable *ht) /* {{{ */
{
	zend_string *key;

	if (ht) {
		if (zend_hash_num_elements(ht)) {
			int first = 1;

			if (!sapi_module.phpinfo_as_text) {
				php_info_printf("<tr><td class=\"e\">Registered %s</td><td class=\"v\">", name);
			} else {
				php_info_printf("\nRegistered %s => ", name);
			}

			ZEND_HASH_FOREACH_STR_KEY(ht, key) {
				if (key) {
					if (first) {
						first = 0;
					} else {
						php_info_print(", ");
					}
					if (!sapi_module.phpinfo_as_text) {
						php_info_print_html_esc(ZSTR_VAL(key), ZSTR_LEN(key));
					} else {
						php_info_print(ZSTR_VAL(key));
					}
				}
			} ZEND_HASH_FOREACH_END();

			if (!sapi_module.phpinfo_as_text) {
				php_info_print("</td></tr>\n");
			}
		} else {
			char reg_name[128];
			snprintf(reg_name, sizeof(reg_name), "Registered %s", name);
			php_info_print_table_row(2, reg_name, "none registered");
		}
	} else {
コード例 #3
0
ファイル: info.c プロジェクト: CongLi/autotest-client-tests
static void php_info_print_request_uri(TSRMLS_D) /* {{{ */
{
	if (SG(request_info).request_uri) {
		php_info_print_html_esc(SG(request_info).request_uri, strlen(SG(request_info).request_uri));
	}
}