mirror of
https://github.com/php/php-src.git
synced 2026-04-26 01:18:19 +02:00
phpinfo() prettying
I will get to the rest of the functions later tonight or tomorrow (i.e. from hyperwave to snmp)
This commit is contained in:
+5
-2
@@ -19,6 +19,7 @@
|
||||
/* $Id$ */
|
||||
|
||||
#include "php.h"
|
||||
|
||||
#if defined(COMPILE_DL)
|
||||
#include "phpdl.h"
|
||||
#endif
|
||||
@@ -30,6 +31,7 @@
|
||||
|
||||
#include "php_aspell.h"
|
||||
#include <aspell-c.h>
|
||||
#include "ext/standard/info.h"
|
||||
|
||||
function_entry aspell_functions[] = {
|
||||
PHP_FE(aspell_new, NULL)
|
||||
@@ -194,8 +196,9 @@ PHP_FUNCTION(aspell_check_raw)
|
||||
|
||||
PHP_MINFO_FUNCTION(aspell)
|
||||
{
|
||||
php_printf("ASpell support enabled");
|
||||
|
||||
php_info_print_table_start();
|
||||
php_info_print_table_row(2, "ASpell Support", "enabled");
|
||||
php_info_print_table_end();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
+6
-2
@@ -42,7 +42,6 @@
|
||||
#include "php_globals.h"
|
||||
#include "ext/standard/php_standard.h"
|
||||
#include "ext/standard/head.h"
|
||||
#include "ext/standard/info.h"
|
||||
#include <math.h>
|
||||
#if HAVE_LIBGD13
|
||||
#include <gd.h>
|
||||
@@ -58,6 +57,7 @@
|
||||
|
||||
#if HAVE_CPDFLIB
|
||||
#include "php_cpdf.h"
|
||||
#include "ext/standard/info.h"
|
||||
|
||||
#ifdef THREAD_SAFE
|
||||
DWORD CPDFlibTls;
|
||||
@@ -187,7 +187,11 @@ PHP_RINIT_FUNCTION(cpdf)
|
||||
|
||||
PHP_MINFO_FUNCTION(cpdf) {
|
||||
/* need to use a PHPAPI function here because it is external module in windows */
|
||||
php_printf("Version %s", cpdf_version());
|
||||
/* (don't knwo if that still applies (cmv) */
|
||||
php_info_print_table_start();
|
||||
php_info_print_table_row(2, "CPDF Support", "enabled");
|
||||
php_info_print_table_row(2, "Version", cpdf_version() );
|
||||
php_info_print_table_end();
|
||||
}
|
||||
|
||||
PHP_MSHUTDOWN_FUNCTION(cpdf){
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#if HAVE_MOD_DAV
|
||||
|
||||
# include "mod_dav.h"
|
||||
#include "ext/standard/info.h"
|
||||
|
||||
/* {{{ thread safety stuff */
|
||||
|
||||
@@ -158,6 +159,9 @@ PHP_RSHUTDOWN_FUNCTION(phpdav)
|
||||
|
||||
PHP_MINFO_FUNCTION(phpdav);
|
||||
{
|
||||
php_info_print_table_start();
|
||||
php_info_print_table_row(2, "DAV Support", "enabled");
|
||||
php_info_print_table_end();
|
||||
}
|
||||
|
||||
/* {{{ extension-internal functions */
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "safe_mode.h"
|
||||
#include "fopen-wrappers.h"
|
||||
#include "ext/standard/flock_compat.h"
|
||||
#include "ext/standard/info.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -230,7 +231,10 @@ static char *php_get_info_db(void)
|
||||
|
||||
PHP_MINFO_FUNCTION(db)
|
||||
{
|
||||
/* this isn't pretty ... should break out the info a bit more (cmv) */
|
||||
php_info_print_box_start(0);
|
||||
php_printf(php_get_info_db());
|
||||
php_info_print_box_end();
|
||||
}
|
||||
|
||||
PHP_FUNCTION(dblist)
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#if HAVE_DBA
|
||||
|
||||
#include "php_dba.h"
|
||||
#include "ext/standard/info.h"
|
||||
|
||||
#include "php_gdbm.h"
|
||||
#include "php_ndbm.h"
|
||||
@@ -197,6 +198,8 @@ static PHP_MSHUTDOWN_FUNCTION(dba)
|
||||
|
||||
static PHP_MINFO_FUNCTION(dba)
|
||||
{
|
||||
/* could be prettier (cmv) */
|
||||
php_info_print_box_start();
|
||||
dba_handler *hptr;
|
||||
|
||||
PUTS("V1 ($Id$)");
|
||||
@@ -204,6 +207,7 @@ static PHP_MINFO_FUNCTION(dba)
|
||||
PUTS(" ");
|
||||
PUTS(hptr->name);
|
||||
}
|
||||
php_info_print_box_end();
|
||||
}
|
||||
|
||||
static void php_dba_update(INTERNAL_FUNCTION_PARAMETERS, int mode)
|
||||
|
||||
+6
-3
@@ -23,6 +23,7 @@
|
||||
#include "php_domxml.h"
|
||||
|
||||
#if HAVE_DOMXML
|
||||
#include "ext/standard/info.h"
|
||||
//#define newcode
|
||||
|
||||
static int le_domxmldocp;
|
||||
@@ -313,9 +314,11 @@ PHP_FUNCTION(domxml_test)
|
||||
|
||||
PHP_MINFO_FUNCTION(domxml)
|
||||
{
|
||||
PUTS("DOM/XML support active (compiled with libxml ");
|
||||
// php_printf("%s", LIBXML_VERSION);
|
||||
PUTS(".)");
|
||||
/* don't know why that line was commented out in the previous version, so i left it (cmv) */
|
||||
php_info_print_table_start();
|
||||
php_info_print_table_row(2, "DOM/XML Support", "enabled");
|
||||
// php_info_print_table_row(2, "libmxl Version", LIBXML_VERSION );
|
||||
php_info_print_table_end();
|
||||
}
|
||||
|
||||
/* {{{ proto string domxml_attrname([int dir_handle])
|
||||
|
||||
+6
-1
@@ -61,6 +61,8 @@
|
||||
|
||||
#if HAVE_FDFLIB
|
||||
|
||||
#include "ext/standard/info.h"
|
||||
|
||||
#ifdef THREAD_SAFE
|
||||
DWORD FDFlibTls;
|
||||
static int numthreads=0;
|
||||
@@ -123,7 +125,10 @@ PHP_MINIT_FUNCTION(fdf)
|
||||
PHP_MINFO_FUNCTION(fdf)
|
||||
{
|
||||
/* need to use a PHPAPI function here because it is external module in windows */
|
||||
php_printf("FdfTk Version %s", FDFGetVersion());
|
||||
php_info_print_table_start();
|
||||
php_info_print_table_row(2, "FDF Support", "enabled");
|
||||
php_info_print_table_row(2, "FdfTk Version", FDFGetVersion() );
|
||||
php_info_print_table_end();
|
||||
}
|
||||
|
||||
PHP_MSHUTDOWN_FUNCTION(fdf)
|
||||
|
||||
+19
-11
@@ -43,6 +43,9 @@
|
||||
#endif
|
||||
|
||||
#if HAVE_LIBGD
|
||||
|
||||
#include "ext/standard/info.h"
|
||||
|
||||
#include <gd.h>
|
||||
#include <gdfontt.h> /* 1 Tiny font */
|
||||
#include <gdfonts.h> /* 2 Small font */
|
||||
@@ -221,34 +224,39 @@ PHP_MINIT_FUNCTION(gd)
|
||||
|
||||
PHP_MINFO_FUNCTION(gd)
|
||||
{
|
||||
php_info_print_table_start();
|
||||
php_info_print_table_row(2, "GD Support", "enabled");
|
||||
|
||||
/* need to use a PHPAPI function here because it is external module in windows */
|
||||
|
||||
#if HAVE_GDIMAGECOLORRESOLVE
|
||||
php_printf("Version 1.6.2 or higher");
|
||||
php_info_print_table_row(2, "GD Version", "1.6.2 or higher");
|
||||
#elif HAVE_LIBGD13
|
||||
php_printf("Version between 1.3 and 1.6.1");
|
||||
php_info_print_table_row(2, "GD Version", "between 1.3 and 1.6.1");
|
||||
#else
|
||||
php_printf("Version 1.2");
|
||||
php_info_print_table_row(2, "GD Version", "1.2");
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_GD_TTF
|
||||
php_printf(" with FreeType support");
|
||||
php_info_print_table_row(2, "FreeType Support", "enabled");
|
||||
#if HAVE_LIBFREETYPE
|
||||
php_printf(" (linked with freetype)");
|
||||
php_info_print_table_row(2, "FreeType Linkage", "with freetype");
|
||||
#elif HAVE_LIBTTF
|
||||
php_printf(" (linked with ttf library)");
|
||||
php_info_print_table_row(2, "FreeType Linkage", "with TTF library");
|
||||
#else
|
||||
php_printf(" (linked with unknown library)");
|
||||
php_info_print_table_row(2, "FreeType Linkage", "with unknown library");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
php_printf(" which supports:");
|
||||
|
||||
/* this next part is stupid ... if I knew better, I'd put them all on one row (cmv) */
|
||||
|
||||
#ifdef HAVE_GD_GIF
|
||||
php_printf(" GIF");
|
||||
php_info_print_table_row(2, "GIF Support", "enabled);
|
||||
#endif
|
||||
#ifdef HAVE_GD_PNG
|
||||
php_printf(" PNG");
|
||||
php_info_print_table_row(2, "PNG Support", "enabled);
|
||||
#endif
|
||||
php_info_print_table_end();
|
||||
}
|
||||
|
||||
/* Need this for cpdf. See also comment in file.c php3i_get_le_fp() */
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#if HAVE_LIBINTL
|
||||
|
||||
#include <libintl.h>
|
||||
#include "ext/standard/info.h"
|
||||
|
||||
function_entry php_gettext_functions[] = {
|
||||
PHP_FE(textdomain, NULL)
|
||||
@@ -42,7 +43,9 @@ zend_module_entry php_gettext_module_entry = {
|
||||
|
||||
PHP_MINFO_FUNCTION(gettext)
|
||||
{
|
||||
php_printf("GNU gettext support active.");
|
||||
php_info_print_table_start();
|
||||
php_info_print_table_row(2, "GNU GetText Support", "enabled");
|
||||
php_info_print_table_end();
|
||||
}
|
||||
|
||||
/* {{{ proto string textdomain(string domain)
|
||||
|
||||
+1
-1
@@ -193,7 +193,7 @@ PHPAPI void php_print_info(int flag)
|
||||
}
|
||||
PUTS("?=PHPE9568F35-D428-11d2-A769-00AA001ACF42\" border=\"0\" align=\"right\"></a>\n");
|
||||
}
|
||||
php_printf("This program makes use of the Zend scripting language engine:<br><pre>%s</pre>", get_zend_version());
|
||||
php_printf("This program makes use of the Zend scripting language engine:<BR>%s<BR>\n", get_zend_version());
|
||||
php_info_print_box_end();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user