]> granicus.if.org Git - php/commitdiff
phpinfo() prettying
authorColin Viebrock <cmv@php.net>
Wed, 5 Apr 2000 21:43:03 +0000 (21:43 +0000)
committerColin Viebrock <cmv@php.net>
Wed, 5 Apr 2000 21:43:03 +0000 (21:43 +0000)
ext/ereg/ereg.c
ext/posix/posix.c
ext/standard/basic_functions.c
ext/standard/dl.c
ext/standard/mail.c
ext/standard/reg.c
ext/xml/xml.c
ext/yp/yp.c
ext/zlib/zlib.c

index f48413606f4e7c4e0b093f9696a1b0991536262a..478c92c0e3aff87dc753a0762bca36706b9a0732 100644 (file)
@@ -23,6 +23,7 @@
 #include "php.h"
 #include "php_string.h"
 #include "reg.h"
+#include "ext/standard/info.h"
 
 #if 0
 zend_module_entry regexp_module_entry = {
@@ -107,9 +108,9 @@ PHP_MSHUTDOWN_FUNCTION(regex)
 PHP_MINFO_FUNCTION(regex)
 {
 #if HSREGEX
-       PUTS("Bundled regex library enabled<br>\n");
+       php_info_print_table_row(2, "Regex Library", "Bundled library enabled");
 #else
-       PUTS("System regex library enabled<br>\n");
+       php_info_print_table_row(2, "Regex Library", "System library enabled");
 #endif
 }
 
index 38a9e12e6342774996506aa7b53bd5b50b95d1d2..dbbe242ab5b6b0102e7d797535109dca46bab884 100644 (file)
@@ -31,6 +31,7 @@
 
 
 #include "php.h"
+#include "ext/standard/info.h"
 #if !defined(PHP_API_VERSION) || PHP_API_VERSION < 19990421
 #include "internal_functions.h"
 #endif
@@ -134,7 +135,9 @@ DLEXPORT zend_module_entry *get_module(void) { return &posix__module_entry; }
 
 static PHP_MINFO_FUNCTION(posix)
 {
-    PUTS("$Revision$\n");
+       php_info_print_table_start();
+       php_info_print_table_row(2, "Revision", "$Revision$");
+       php_info_print_table_end();
 }
 
 /* {{{ proto int posix_kill(int pid, int sig)
index 91052accb0ae9aa79e80351b6bd4c5be145bd860..97e3d2942c1161c294729af0966668ec92259e43 100644 (file)
@@ -23,6 +23,7 @@
 #include "php_ini.h"
 #include "internal_functions_registry.h"
 #include "php_standard.h"
+#include "ext/standard/info.h"
 #include "zend_operators.h"
 #include <stdarg.h>
 #include <stdlib.h>
@@ -708,9 +709,11 @@ PHP_GINIT_FUNCTION(basic)
 
 PHP_MINFO_FUNCTION(basic)
 {
+        php_info_print_table_start();
        PHP_MINFO(regex)(ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU);
        PHP_MINFO(dl)(ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU);
        PHP_MINFO(mail)(ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU);
+        php_info_print_table_end();
        PHP_MINFO(assert)(ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU);
 }
 
index a06c7bb77d6d475a3caab2fb116907e76ca6c454..05e92e7c08a56b90c86aa6ff3af0a27da7f6edeb 100644 (file)
@@ -21,6 +21,7 @@
 #include "php.h"
 #include "dl.h"
 #include "php_globals.h"
+#include "ext/standard/info.h"
 
 #ifdef HAVE_LIBDL
 #include <stdlib.h>
@@ -181,7 +182,7 @@ void php_dl(pval *file,int type,pval *return_value)
 
 PHP_MINFO_FUNCTION(dl)
 {
-       PUTS("Dynamic Library support enabled<br>.\n");
+        php_info_print_table_row(2, "Dynamic Library Support", "enabled");
 }
 
 #else
index 4f4938d432c01a31d41cd9be77ba154747b72f18..77b8dd0a19c3cf6a5ad1fb3cb74922cab52a6f0f 100644 (file)
@@ -22,6 +22,7 @@
 #include <ctype.h>
 #include <stdio.h>
 #include "php.h"
+#include "ext/standard/info.h"
 #if !defined(PHP_WIN32)
 #include "build-defs.h"
 #endif
@@ -135,9 +136,9 @@ int php_mail(char *to, char *subject, char *message, char *headers)
 PHP_MINFO_FUNCTION(mail)
 {
 #ifdef PHP_WIN32
-       PUTS("Internal Sendmail support for Windows 4");
+        php_info_print_table_row(2, "Internal Sendmail Support for Windows 4", "enabled");
 #else
-       php_printf("Path to sendmail: <tt>%s</tt>", INI_STR("sendmail_path"));
+        php_info_print_table_row(2, "Path to sendmail", INI_STR("sendmail_path") );
 #endif
 }
 
index f48413606f4e7c4e0b093f9696a1b0991536262a..478c92c0e3aff87dc753a0762bca36706b9a0732 100644 (file)
@@ -23,6 +23,7 @@
 #include "php.h"
 #include "php_string.h"
 #include "reg.h"
+#include "ext/standard/info.h"
 
 #if 0
 zend_module_entry regexp_module_entry = {
@@ -107,9 +108,9 @@ PHP_MSHUTDOWN_FUNCTION(regex)
 PHP_MINFO_FUNCTION(regex)
 {
 #if HSREGEX
-       PUTS("Bundled regex library enabled<br>\n");
+       php_info_print_table_row(2, "Regex Library", "Bundled library enabled");
 #else
-       PUTS("System regex library enabled<br>\n");
+       php_info_print_table_row(2, "Regex Library", "System library enabled");
 #endif
 }
 
index b4ae6be08a27b6e7a66a04c219f5504b6ecd8a81..7576e0af3c17c3c125cd3a05f2fb0a03d3f9acd9 100644 (file)
@@ -25,7 +25,7 @@
 #include "php_xml.h"
 #include "zend_variables.h"
 #include "ext/standard/php_string.h"
-
+#include "ext/standard/info.h"
 
 #if HAVE_LIBEXPAT
 
@@ -218,7 +218,10 @@ PHP_RSHUTDOWN_FUNCTION(xml)
 
 PHP_MINFO_FUNCTION(xml)
 {
-       PUTS("XML support active");
+
+        php_info_print_table_start();
+       php_info_print_table_row(2, "XML Support", "active");
+        php_info_print_table_end();
 }
 
 
index 40fbf44a689abc0f984731a2fa1ddcb91acd787c..a8d82d751cdc9b1c65cc2e593eebade3822fe4c9 100644 (file)
@@ -18,6 +18,7 @@
 /* $Id$ */
 
 #include "php.h"
+#include "ext/standard/info.h"
 
 #if HAVE_YP
 
@@ -176,6 +177,8 @@ PHP_FUNCTION(yp_next) {
 /* }}} */
 
 PHP_MINFO_FUNCTION(yp) {
-       PUTS("Compiled with YP Support.");
+        php_info_print_table_start();
+        php_info_print_table_row(2, "YP Support", "enabled");
+        php_info_print_table_end();
 }
 #endif /* HAVE_YP */
index 52440e749cd7e0bda410e8585b4966d836674c12..9ecf8151226fca739c4b1b502a9f31a98a94ae12 100644 (file)
@@ -39,6 +39,7 @@
 #include "ext/standard/head.h"
 #include "safe_mode.h"
 #include "ext/standard/php_standard.h"
+#include "ext/standard/info.h"
 #include "php_zlib.h"
 #include "fopen-wrappers.h"
 #if HAVE_PWD_H
@@ -141,11 +142,11 @@ PHP_MSHUTDOWN_FUNCTION(zlib)
 
 PHP_MINFO_FUNCTION(zlib)
 {
-               PUTS("Zlib support active (compiled with ");
-               PUTS(ZLIB_VERSION);
-               PUTS(", linked with ");
-               PUTS((char *)zlibVersion());
-               PUTS(").");
+       php_info_print_table_start();
+       php_info_print_table_row(2, "ZLib Support", "enabled");
+       php_info_print_table_row(2, "Compiled Version", ZLIB_VERSION );
+       php_info_print_table_row(2, "Linked Version", (char *)zlibVersion() );
+       php_info_print_table_end();
 }
 
 static gzFile *php_gzopen_with_path(char *filename, char *mode, char *path, char **opened_path);