1999-04-17 08:37:12 +08:00
|
|
|
|
/*
|
|
|
|
|
+----------------------------------------------------------------------+
|
1999-07-16 21:13:16 +08:00
|
|
|
|
| PHP version 4.0 |
|
1999-04-17 08:37:12 +08:00
|
|
|
|
+----------------------------------------------------------------------+
|
2000-01-01 09:32:05 +08:00
|
|
|
|
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
|
1999-04-17 08:37:12 +08:00
|
|
|
|
+----------------------------------------------------------------------+
|
2000-05-18 23:34:45 +08:00
|
|
|
|
| This source file is subject to version 2.02 of the PHP license, |
|
1999-07-16 21:13:16 +08:00
|
|
|
|
| that is bundled with this package in the file LICENSE, and is |
|
|
|
|
|
| available at through the world-wide-web at |
|
2000-05-18 23:34:45 +08:00
|
|
|
|
| http://www.php.net/license/2_02.txt. |
|
1999-07-16 21:13:16 +08:00
|
|
|
|
| If you did not receive a copy of the PHP license and are unable to |
|
|
|
|
|
| obtain it through the world-wide-web, please send a note to |
|
|
|
|
|
| license@php.net so we can mail you a copy immediately. |
|
1999-04-17 08:37:12 +08:00
|
|
|
|
+----------------------------------------------------------------------+
|
|
|
|
|
| Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
|
|
|
|
|
| Zeev Suraski <zeev@zend.com> |
|
|
|
|
|
+----------------------------------------------------------------------+
|
2000-07-24 09:40:02 +08:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/* $Id$ */
|
1999-04-24 04:06:01 +08:00
|
|
|
|
|
1999-04-17 08:37:12 +08:00
|
|
|
|
#include "php.h"
|
|
|
|
|
#include "php_ini.h"
|
|
|
|
|
#include "php_globals.h"
|
1999-04-22 08:25:57 +08:00
|
|
|
|
#include "ext/standard/head.h"
|
1999-04-17 08:37:12 +08:00
|
|
|
|
#include "info.h"
|
1999-04-27 01:26:37 +08:00
|
|
|
|
#include "SAPI.h"
|
2000-04-20 07:17:02 +08:00
|
|
|
|
#include <time.h>
|
2000-02-11 23:59:30 +08:00
|
|
|
|
#if !defined(PHP_WIN32)
|
1999-04-17 08:37:12 +08:00
|
|
|
|
#include "build-defs.h"
|
|
|
|
|
#endif
|
|
|
|
|
#include "zend_globals.h" /* needs ELS */
|
2000-05-19 16:28:53 +08:00
|
|
|
|
#include "zend_highlight.h"
|
1999-04-17 08:37:12 +08:00
|
|
|
|
|
|
|
|
|
|
2000-02-26 11:20:55 +08:00
|
|
|
|
#define PHP_CONF_LONG(directive,value1,value2) \
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_printf("<TR VALIGN=\"baseline\" BGCOLOR=\"" PHP_CONTENTS_COLOR "\"><TD BGCOLOR=\"" PHP_ENTRY_NAME_COLOR "\">%s<BR></TD><TD>%ld<BR></TD><TD>%ld<BR></TD></TR>\n",directive,value1,value2);
|
1999-04-17 08:37:12 +08:00
|
|
|
|
|
2000-04-06 04:17:02 +08:00
|
|
|
|
#define SECTION(name) PUTS("<H2>" name "</H2>\n")
|
1999-04-17 08:37:12 +08:00
|
|
|
|
|
1999-05-09 16:48:05 +08:00
|
|
|
|
#define CREDIT_LINE(module, authors) php_info_print_table_row(2, module, authors)
|
2000-07-25 18:54:07 +08:00
|
|
|
|
PHPAPI extern char *php_ini_path;
|
1999-05-09 16:48:05 +08:00
|
|
|
|
|
1999-08-08 01:52:11 +08:00
|
|
|
|
static int _display_module_info(zend_module_entry *module, void *arg)
|
1999-04-17 08:37:12 +08:00
|
|
|
|
{
|
1999-08-08 01:52:11 +08:00
|
|
|
|
int show_info_func = *((int *) arg);
|
|
|
|
|
|
|
|
|
|
if (show_info_func && module->info_func) {
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_printf("<A NAME=\"module_%s\"><H2>%s</H2>\n", module->name, module->name);
|
1999-05-09 16:48:05 +08:00
|
|
|
|
module->info_func(module);
|
1999-08-08 01:52:11 +08:00
|
|
|
|
} else if (!show_info_func && !module->info_func) {
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_printf("<TR VALIGN=\"baseline\" BGCOLOR=\"" PHP_CONTENTS_COLOR "\">");
|
|
|
|
|
php_printf("<TD>");
|
1999-08-08 01:52:11 +08:00
|
|
|
|
php_printf(module->name);
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_printf("</TD></TR>\n");
|
1999-04-17 08:37:12 +08:00
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2000-02-06 06:58:59 +08:00
|
|
|
|
static void php_print_gpcse_array(char *name, uint name_length ELS_DC)
|
|
|
|
|
{
|
|
|
|
|
zval **data, **tmp;
|
|
|
|
|
char *string_key;
|
|
|
|
|
ulong num_key;
|
|
|
|
|
|
|
|
|
|
if (zend_hash_find(&EG(symbol_table), name, name_length+1, (void **) &data)!=FAILURE
|
|
|
|
|
&& ((*data)->type==IS_ARRAY)) {
|
|
|
|
|
zend_hash_internal_pointer_reset((*data)->value.ht);
|
|
|
|
|
while (zend_hash_get_current_data((*data)->value.ht, (void **) &tmp) == SUCCESS) {
|
|
|
|
|
zval tmp2, *value_ptr;
|
|
|
|
|
|
|
|
|
|
if ((*tmp)->type != IS_STRING) {
|
|
|
|
|
tmp2 = **tmp;
|
|
|
|
|
zval_copy_ctor(&tmp2);
|
|
|
|
|
convert_to_string(&tmp2);
|
|
|
|
|
value_ptr = &tmp2;
|
|
|
|
|
} else {
|
|
|
|
|
value_ptr = *tmp;
|
|
|
|
|
}
|
2000-04-06 04:17:02 +08:00
|
|
|
|
PUTS("<TR VALIGN=\"baseline\" BGCOLOR=\"" PHP_CONTENTS_COLOR "\">");
|
|
|
|
|
PUTS("<TD BGCOLOR=\"" PHP_ENTRY_NAME_COLOR "\"><B>");
|
2000-02-06 06:58:59 +08:00
|
|
|
|
PUTS(name);
|
|
|
|
|
PUTS("[\"");
|
|
|
|
|
switch (zend_hash_get_current_key((*data)->value.ht, &string_key, &num_key)) {
|
|
|
|
|
case HASH_KEY_IS_STRING:
|
|
|
|
|
PUTS(string_key);
|
|
|
|
|
efree(string_key);
|
|
|
|
|
break;
|
|
|
|
|
case HASH_KEY_IS_LONG:
|
|
|
|
|
php_printf("%ld",num_key);
|
|
|
|
|
break;
|
|
|
|
|
}
|
2000-04-06 04:17:02 +08:00
|
|
|
|
PUTS("\"]</B></TD><TD>");
|
2000-02-06 06:58:59 +08:00
|
|
|
|
if ((*tmp)->type == IS_ARRAY) {
|
2000-04-06 04:17:02 +08:00
|
|
|
|
PUTS("<PRE>");
|
2000-02-06 06:58:59 +08:00
|
|
|
|
zend_print_zval_r(*tmp, 0);
|
2000-04-06 04:17:02 +08:00
|
|
|
|
PUTS("</PRE>");
|
2000-02-06 06:58:59 +08:00
|
|
|
|
} else {
|
|
|
|
|
PUTS(value_ptr->value.str.val);
|
|
|
|
|
}
|
2000-04-06 04:17:02 +08:00
|
|
|
|
PUTS("</TD></TR>\n");
|
2000-02-06 06:58:59 +08:00
|
|
|
|
zend_hash_move_forward((*data)->value.ht);
|
|
|
|
|
if (value_ptr==&tmp2) {
|
|
|
|
|
zval_dtor(value_ptr);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2000-04-06 04:17:02 +08:00
|
|
|
|
void php_info_print_style()
|
|
|
|
|
{
|
|
|
|
|
php_printf("<STYLE TYPE=\"text/css\"><!--\n");
|
|
|
|
|
php_printf("A { text-decoration: none; }\n");
|
|
|
|
|
php_printf("A:hover { text-decoration: underline; }\n");
|
|
|
|
|
php_printf("H1 { font-family: arial,helvetica,sans-serif; font-size: 18pt; font-weight: bold;}\n");
|
|
|
|
|
php_printf("H2 { font-family: arial,helvetica,sans-serif; font-size: 14pt; font-weight: bold;}\n");
|
|
|
|
|
php_printf("BODY,TD { font-family: arial,helvetica,sans-serif; font-size: 10pt; }\n");
|
|
|
|
|
php_printf("TH { font-family: arial,helvetica,sans-serif; font-size: 11pt; font-weight: bold; }\n");
|
|
|
|
|
php_printf("//--></STYLE>\n");
|
|
|
|
|
}
|
|
|
|
|
|
2000-02-06 06:58:59 +08:00
|
|
|
|
|
1999-07-18 03:17:42 +08:00
|
|
|
|
PHPAPI void php_print_info(int flag)
|
1999-04-17 08:37:12 +08:00
|
|
|
|
{
|
|
|
|
|
char **env,*tmp1,*tmp2;
|
1999-12-18 12:01:20 +08:00
|
|
|
|
char *php_uname;
|
1999-09-12 00:32:08 +08:00
|
|
|
|
int expose_php = INI_INT("expose_php");
|
2000-04-20 07:17:02 +08:00
|
|
|
|
time_t the_time;
|
|
|
|
|
struct tm *ta, tmbuf;
|
2000-02-11 23:59:30 +08:00
|
|
|
|
#ifdef PHP_WIN32
|
1999-12-18 12:01:20 +08:00
|
|
|
|
char php_windows_uname[256];
|
1999-04-17 08:37:12 +08:00
|
|
|
|
DWORD dwBuild=0;
|
|
|
|
|
DWORD dwVersion = GetVersion();
|
|
|
|
|
DWORD dwWindowsMajorVersion = (DWORD)(LOBYTE(LOWORD(dwVersion)));
|
|
|
|
|
DWORD dwWindowsMinorVersion = (DWORD)(HIBYTE(LOWORD(dwVersion)));
|
|
|
|
|
#endif
|
|
|
|
|
ELS_FETCH();
|
1999-05-03 03:54:02 +08:00
|
|
|
|
SLS_FETCH();
|
1999-08-08 02:21:35 +08:00
|
|
|
|
|
2000-04-20 07:46:26 +08:00
|
|
|
|
the_time = time(NULL);
|
2000-05-04 18:38:17 +08:00
|
|
|
|
ta = php_localtime_r(&the_time, &tmbuf);
|
1999-04-17 08:37:12 +08:00
|
|
|
|
|
2000-06-09 09:50:44 +08:00
|
|
|
|
PUTS("<CENTER>");
|
|
|
|
|
|
1999-07-15 00:02:10 +08:00
|
|
|
|
if (flag & PHP_INFO_GENERAL) {
|
2000-05-19 16:28:53 +08:00
|
|
|
|
char *zend_version = get_zend_version();
|
|
|
|
|
|
2000-02-11 23:59:30 +08:00
|
|
|
|
#ifdef PHP_WIN32
|
2000-06-17 02:24:02 +08:00
|
|
|
|
/* Get build numbers for Windows NT or Win95 */
|
1999-07-15 00:02:10 +08:00
|
|
|
|
if (dwVersion < 0x80000000){
|
|
|
|
|
dwBuild = (DWORD)(HIWORD(dwVersion));
|
1999-12-18 12:01:20 +08:00
|
|
|
|
snprintf(php_windows_uname,255,"%s %d.%d build %d","Windows NT",dwWindowsMajorVersion,dwWindowsMinorVersion,dwBuild);
|
1999-07-15 00:02:10 +08:00
|
|
|
|
} else {
|
1999-12-18 12:01:20 +08:00
|
|
|
|
snprintf(php_windows_uname,255,"%s %d.%d","Windows 95/98",dwWindowsMajorVersion,dwWindowsMinorVersion);
|
1999-07-15 00:02:10 +08:00
|
|
|
|
}
|
1999-12-18 12:01:20 +08:00
|
|
|
|
php_uname = php_windows_uname;
|
1999-04-17 08:37:12 +08:00
|
|
|
|
#else
|
1999-12-18 12:01:20 +08:00
|
|
|
|
php_uname=PHP_UNAME;
|
1999-04-17 08:37:12 +08:00
|
|
|
|
#endif
|
|
|
|
|
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_info_print_style();
|
1999-04-17 08:37:12 +08:00
|
|
|
|
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_info_print_box_start(1);
|
1999-09-12 00:32:08 +08:00
|
|
|
|
if (expose_php) {
|
1999-08-08 02:21:35 +08:00
|
|
|
|
PUTS("<a href=\"http://www.php.net/\"><img src=\"");
|
|
|
|
|
if (SG(request_info).request_uri) {
|
|
|
|
|
PUTS(SG(request_info).request_uri);
|
|
|
|
|
}
|
2000-04-20 07:17:02 +08:00
|
|
|
|
if ((ta->tm_mon==3) && (ta->tm_mday==1)) {
|
|
|
|
|
PUTS("?=PHPE9568F36-D428-11d2-A769-00AA001ACF42\" border=0 align=\"right\"></a>");
|
|
|
|
|
} else {
|
|
|
|
|
PUTS("?=PHPE9568F34-D428-11d2-A769-00AA001ACF42\" border=0 align=\"right\"></a>");
|
|
|
|
|
}
|
1999-07-15 00:02:10 +08:00
|
|
|
|
}
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_printf("<H1>PHP Version %s</H1>\n", PHP_VERSION);
|
|
|
|
|
php_info_print_box_end();
|
|
|
|
|
php_info_print_table_start();
|
|
|
|
|
php_info_print_table_row(2, "System", php_uname );
|
|
|
|
|
php_info_print_table_row(2, "Build Date", __DATE__ );
|
1999-12-04 04:08:24 +08:00
|
|
|
|
#ifdef CONFIGURE_COMMAND
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_info_print_table_row(2, "Configure Command", CONFIGURE_COMMAND );
|
1999-12-04 04:08:24 +08:00
|
|
|
|
#endif
|
2000-06-27 02:05:55 +08:00
|
|
|
|
if (sapi_module.pretty_name) {
|
|
|
|
|
php_info_print_table_row(2, "Server API", sapi_module.pretty_name );
|
2000-04-07 23:30:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
2000-04-22 00:20:11 +08:00
|
|
|
|
#ifdef VIRTUAL_DIR
|
|
|
|
|
php_info_print_table_row(2, "Virtual Directory Support", "enabled" );
|
|
|
|
|
#else
|
|
|
|
|
php_info_print_table_row(2, "Virtual Directory Support", "disabled" );
|
|
|
|
|
#endif
|
|
|
|
|
|
2000-07-25 18:54:07 +08:00
|
|
|
|
php_info_print_table_row(2, "Configuration File (php.ini) Path", php_ini_path?php_ini_path:CONFIGURATION_FILE_PATH );
|
2000-04-06 04:29:20 +08:00
|
|
|
|
|
2000-04-07 06:54:33 +08:00
|
|
|
|
#if ZEND_DEBUG
|
2000-04-08 00:41:19 +08:00
|
|
|
|
php_info_print_table_row(2, "ZEND_DEBUG", "enabled" );
|
2000-04-06 05:03:30 +08:00
|
|
|
|
#else
|
2000-04-08 00:41:19 +08:00
|
|
|
|
php_info_print_table_row(2, "ZEND_DEBUG", "disabled" );
|
2000-04-06 05:03:30 +08:00
|
|
|
|
#endif
|
2000-04-06 04:29:20 +08:00
|
|
|
|
|
1999-05-20 20:06:45 +08:00
|
|
|
|
#ifdef ZTS
|
2000-04-08 00:41:19 +08:00
|
|
|
|
php_info_print_table_row(2, "Thread Safety", "enabled" );
|
1999-05-20 20:06:45 +08:00
|
|
|
|
#else
|
2000-04-08 00:41:19 +08:00
|
|
|
|
php_info_print_table_row(2, "Thread Safety", "disabled" );
|
1999-05-20 20:06:45 +08:00
|
|
|
|
#endif
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_info_print_table_end();
|
|
|
|
|
|
1999-07-15 00:02:10 +08:00
|
|
|
|
/* Zend Engine */
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_info_print_box_start(0);
|
1999-09-12 00:32:08 +08:00
|
|
|
|
if (expose_php) {
|
1999-08-08 02:21:35 +08:00
|
|
|
|
PUTS("<a href=\"http://www.zend.com/\"><img src=\"");
|
|
|
|
|
if (SG(request_info).request_uri) {
|
|
|
|
|
PUTS(SG(request_info).request_uri);
|
|
|
|
|
}
|
|
|
|
|
PUTS("?=PHPE9568F35-D428-11d2-A769-00AA001ACF42\" border=\"0\" align=\"right\"></a>\n");
|
1999-07-15 00:02:10 +08:00
|
|
|
|
}
|
2000-05-19 16:28:53 +08:00
|
|
|
|
php_printf("This program makes use of the Zend scripting language engine:<BR>");
|
|
|
|
|
zend_html_puts(zend_version, strlen(zend_version));
|
|
|
|
|
php_printf("</BR>\n");
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_info_print_box_end();
|
1999-05-09 16:48:05 +08:00
|
|
|
|
}
|
|
|
|
|
|
1999-09-12 00:32:08 +08:00
|
|
|
|
if ((flag & PHP_INFO_CREDITS) && expose_php) {
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_info_print_hr();
|
1999-07-18 03:17:42 +08:00
|
|
|
|
PUTS("<a href=\"");
|
|
|
|
|
if (SG(request_info).request_uri) {
|
|
|
|
|
PUTS(SG(request_info).request_uri);
|
|
|
|
|
}
|
|
|
|
|
PUTS("?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000\">");
|
2000-04-06 04:17:02 +08:00
|
|
|
|
PUTS("<h1>PHP 4.0 Credits</h1>");
|
1999-07-18 03:17:42 +08:00
|
|
|
|
PUTS("</a>\n");
|
1999-07-15 00:02:10 +08:00
|
|
|
|
}
|
|
|
|
|
|
2000-06-03 11:05:29 +08:00
|
|
|
|
php_ini_sort_entries();
|
1999-07-15 00:02:10 +08:00
|
|
|
|
|
|
|
|
|
if (flag & PHP_INFO_CONFIGURATION) {
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_info_print_hr();
|
|
|
|
|
PUTS("<h1>Configuration</h1>\n");
|
|
|
|
|
SECTION("PHP Core\n");
|
1999-07-15 00:02:10 +08:00
|
|
|
|
display_ini_entries(NULL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (flag & PHP_INFO_MODULES) {
|
1999-08-08 01:52:11 +08:00
|
|
|
|
int show_info_func;
|
|
|
|
|
|
|
|
|
|
show_info_func = 1;
|
|
|
|
|
zend_hash_apply_with_argument(&module_registry, (int (*)(void *, void *)) _display_module_info, &show_info_func);
|
|
|
|
|
|
|
|
|
|
SECTION("Additional Modules");
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_info_print_table_start();
|
1999-08-08 01:52:11 +08:00
|
|
|
|
show_info_func = 0;
|
|
|
|
|
zend_hash_apply_with_argument(&module_registry, (int (*)(void *, void *)) _display_module_info, &show_info_func);
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_info_print_table_end();
|
1999-07-15 00:02:10 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (flag & PHP_INFO_ENVIRONMENT) {
|
|
|
|
|
SECTION("Environment");
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_info_print_table_start();
|
1999-07-15 00:02:10 +08:00
|
|
|
|
php_info_print_table_header(2, "Variable", "Value");
|
|
|
|
|
for (env=environ; env!=NULL && *env !=NULL; env++) {
|
|
|
|
|
tmp1 = estrdup(*env);
|
|
|
|
|
if (!(tmp2=strchr(tmp1,'='))) { /* malformed entry? */
|
|
|
|
|
efree(tmp1);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
*tmp2 = 0;
|
|
|
|
|
tmp2++;
|
|
|
|
|
php_info_print_table_row(2, tmp1, tmp2);
|
1999-04-17 08:37:12 +08:00
|
|
|
|
efree(tmp1);
|
|
|
|
|
}
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_info_print_table_end();
|
1999-04-17 08:37:12 +08:00
|
|
|
|
}
|
|
|
|
|
|
1999-07-15 00:02:10 +08:00
|
|
|
|
if (flag & PHP_INFO_VARIABLES) {
|
2000-02-06 06:58:59 +08:00
|
|
|
|
pval **data;
|
1999-04-17 08:37:12 +08:00
|
|
|
|
|
|
|
|
|
SECTION("PHP Variables");
|
|
|
|
|
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_info_print_table_start();
|
1999-05-09 16:48:05 +08:00
|
|
|
|
php_info_print_table_header(2, "Variable", "Value");
|
1999-08-03 03:17:14 +08:00
|
|
|
|
if (zend_hash_find(&EG(symbol_table), "PHP_SELF", sizeof("PHP_SELF"), (void **) &data) != FAILURE) {
|
1999-05-09 16:48:05 +08:00
|
|
|
|
php_info_print_table_row(2, "PHP_SELF", (*data)->value.str.val);
|
1999-04-17 08:37:12 +08:00
|
|
|
|
}
|
1999-08-03 03:17:14 +08:00
|
|
|
|
if (zend_hash_find(&EG(symbol_table), "PHP_AUTH_TYPE", sizeof("PHP_AUTH_TYPE"), (void **) &data) != FAILURE) {
|
1999-05-09 16:48:05 +08:00
|
|
|
|
php_info_print_table_row(2, "PHP_AUTH_TYPE", (*data)->value.str.val);
|
1999-04-17 08:37:12 +08:00
|
|
|
|
}
|
1999-08-03 03:17:14 +08:00
|
|
|
|
if (zend_hash_find(&EG(symbol_table), "PHP_AUTH_USER", sizeof("PHP_AUTH_USER"), (void **) &data) != FAILURE) {
|
1999-05-09 16:48:05 +08:00
|
|
|
|
php_info_print_table_row(2, "PHP_AUTH_USER", (*data)->value.str.val);
|
1999-04-17 08:37:12 +08:00
|
|
|
|
}
|
1999-08-03 03:17:14 +08:00
|
|
|
|
if (zend_hash_find(&EG(symbol_table), "PHP_AUTH_PW", sizeof("PHP_AUTH_PW"), (void **) &data) != FAILURE) {
|
1999-05-09 16:48:05 +08:00
|
|
|
|
php_info_print_table_row(2, "PHP_AUTH_PW", (*data)->value.str.val);
|
1999-04-17 08:37:12 +08:00
|
|
|
|
}
|
2000-02-06 06:58:59 +08:00
|
|
|
|
php_print_gpcse_array("HTTP_GET_VARS", sizeof("HTTP_GET_VARS")-1 ELS_CC);
|
|
|
|
|
php_print_gpcse_array("HTTP_POST_VARS", sizeof("HTTP_POST_VARS")-1 ELS_CC);
|
2000-02-20 04:12:26 +08:00
|
|
|
|
php_print_gpcse_array("HTTP_POST_FILES", sizeof("HTTP_POST_FILES")-1 ELS_CC);
|
2000-02-06 06:58:59 +08:00
|
|
|
|
php_print_gpcse_array("HTTP_COOKIE_VARS", sizeof("HTTP_COOKIE_VARS")-1 ELS_CC);
|
|
|
|
|
php_print_gpcse_array("HTTP_SERVER_VARS", sizeof("HTTP_SERVER_VARS")-1 ELS_CC);
|
|
|
|
|
php_print_gpcse_array("HTTP_ENV_VARS", sizeof("HTTP_ENV_VARS")-1 ELS_CC);
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_info_print_table_end();
|
1999-04-17 08:37:12 +08:00
|
|
|
|
}
|
|
|
|
|
|
1999-07-15 00:02:10 +08:00
|
|
|
|
if (flag & PHP_INFO_LICENSE) {
|
|
|
|
|
SECTION("PHP License");
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_info_print_box_start(0);
|
|
|
|
|
PUTS("<P>\n");
|
|
|
|
|
PUTS("This program is free software; you can redistribute it and/or modify ");
|
|
|
|
|
PUTS("it under the terms of the PHP License as published by the PHP Group ");
|
1999-07-15 00:02:10 +08:00
|
|
|
|
PUTS("and included in the distribution in the file: LICENSE\n");
|
2000-04-06 04:17:02 +08:00
|
|
|
|
PUTS("</P>\n");
|
|
|
|
|
PUTS("<P>");
|
|
|
|
|
PUTS("This program is distributed in the hope that it will be useful, ");
|
|
|
|
|
PUTS("but WITHOUT ANY WARRANTY; without even the implied warranty of ");
|
1999-07-15 00:02:10 +08:00
|
|
|
|
PUTS("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n");
|
2000-04-06 04:17:02 +08:00
|
|
|
|
PUTS("</P>\n");
|
|
|
|
|
PUTS("<P>");
|
|
|
|
|
PUTS("If you did not receive a copy of the PHP license, or have any questions about ");
|
|
|
|
|
PUTS("PHP licensing, please contact license@php.net.\n");
|
|
|
|
|
PUTS("</P>\n");
|
|
|
|
|
php_info_print_box_end();
|
1999-07-15 00:02:10 +08:00
|
|
|
|
}
|
2000-06-09 09:50:44 +08:00
|
|
|
|
|
|
|
|
|
PUTS("</center>");
|
1999-04-17 08:37:12 +08:00
|
|
|
|
}
|
|
|
|
|
|
1999-05-09 16:48:05 +08:00
|
|
|
|
|
1999-07-18 03:17:42 +08:00
|
|
|
|
void php_print_credits(int flag)
|
|
|
|
|
{
|
|
|
|
|
if (flag & PHP_CREDITS_FULLPAGE) {
|
2000-06-09 09:50:44 +08:00
|
|
|
|
PUTS("<html><head><title>PHP Credits</title></head><body>\n");
|
1999-07-18 03:17:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_info_print_style();
|
|
|
|
|
|
2000-06-09 09:50:44 +08:00
|
|
|
|
PUTS("<center>");
|
1999-07-18 03:22:27 +08:00
|
|
|
|
PUTS("<h1>PHP 4.0 Credits</h1>\n");
|
1999-07-18 03:17:42 +08:00
|
|
|
|
|
2000-02-19 01:59:44 +08:00
|
|
|
|
if (flag & PHP_CREDITS_GROUP) {
|
|
|
|
|
/* Group */
|
|
|
|
|
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_info_print_table_start();
|
2000-02-19 01:59:44 +08:00
|
|
|
|
php_info_print_table_header(1, "PHP Group");
|
2000-05-27 08:24:03 +08:00
|
|
|
|
php_info_print_table_row(1, "Thies C. Arntzen, Stig Bakken, Andi Gutmans, Rasmus Lerdorf, Sam Ruby,\
|
2000-02-19 01:59:44 +08:00
|
|
|
|
Sascha Schumann, Zeev Suraski, Jim Winstead, Andrei Zmievski");
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_info_print_table_end();
|
2000-02-19 01:59:44 +08:00
|
|
|
|
}
|
|
|
|
|
|
1999-07-18 03:17:42 +08:00
|
|
|
|
if (flag & PHP_CREDITS_GENERAL) {
|
2000-04-19 20:43:54 +08:00
|
|
|
|
/* Design & Concept */
|
|
|
|
|
php_info_print_table_start();
|
|
|
|
|
php_info_print_table_header(1, "Language Design & Concept");
|
|
|
|
|
php_info_print_table_row(1, "Andi Gutmans, Rasmus Lerdorf, Zeev Suraski");
|
|
|
|
|
php_info_print_table_end();
|
2000-02-19 01:59:44 +08:00
|
|
|
|
|
2000-04-19 20:43:54 +08:00
|
|
|
|
/* PHP 4.0 Language */
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_info_print_table_start();
|
2000-04-08 00:41:19 +08:00
|
|
|
|
php_info_print_table_colspan_header(2, "PHP 4.0 Authors");
|
1999-07-18 03:17:42 +08:00
|
|
|
|
php_info_print_table_header(2, "Contribution", "Authors");
|
|
|
|
|
CREDIT_LINE("Zend Scripting Language Engine", "Andi Gutmans, Zeev Suraski");
|
|
|
|
|
CREDIT_LINE("Extension Module API", "Andi Gutmans, Zeev Suraski");
|
1999-10-04 23:18:26 +08:00
|
|
|
|
CREDIT_LINE("UNIX Build and Modularization", "Stig Bakken, Sascha Schumann");
|
1999-07-18 03:17:42 +08:00
|
|
|
|
CREDIT_LINE("Win32 Port", "Shane Caraveo, Zeev Suraski");
|
|
|
|
|
CREDIT_LINE("Server API (SAPI) Abstraction Layer", "Andi Gutmans, Shane Caraveo, Zeev Suraski");
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_info_print_table_end();
|
2000-02-19 01:59:44 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (flag & PHP_CREDITS_GENERAL) {
|
|
|
|
|
/* SAPI Modules */
|
|
|
|
|
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_info_print_table_start();
|
2000-08-20 22:43:56 +08:00
|
|
|
|
php_info_print_table_colspan_header(2, "SAPI Modules");
|
2000-02-19 01:59:44 +08:00
|
|
|
|
php_info_print_table_header(2, "Contribution", "Authors");
|
|
|
|
|
CREDIT_LINE("Apache", "Rasmus Lerdorf, Zeev Suraski");
|
|
|
|
|
CREDIT_LINE("ISAPI", "Andi Gutmans, Zeev Suraski");
|
|
|
|
|
CREDIT_LINE("CGI", "Rasmus Lerdorf, Stig Bakken");
|
|
|
|
|
CREDIT_LINE("AOLserver", "Sascha Schumann");
|
|
|
|
|
CREDIT_LINE("Java Servlet", "Sam Ruby");
|
|
|
|
|
CREDIT_LINE("Roxen", "David Hedbor");
|
|
|
|
|
CREDIT_LINE("thttpd", "Sascha Schumann");
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_info_print_table_end();
|
1999-07-18 03:17:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (flag & PHP_CREDITS_MODULES) {
|
|
|
|
|
/* Modules */
|
2000-02-19 01:59:44 +08:00
|
|
|
|
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_info_print_table_start();
|
2000-04-08 00:41:19 +08:00
|
|
|
|
php_info_print_table_colspan_header(2, "Module Authors");
|
1999-07-18 03:17:42 +08:00
|
|
|
|
php_info_print_table_header(2, "Module", "Authors");
|
1999-07-20 02:37:42 +08:00
|
|
|
|
CREDIT_LINE("Apache", "Rasmus Lerdorf, Stig Bakken, David Sklar");
|
2000-03-16 10:18:24 +08:00
|
|
|
|
CREDIT_LINE("Assert", "Thies C. Arntzen");
|
1999-07-18 03:17:42 +08:00
|
|
|
|
CREDIT_LINE("BC Math", "Andi Gutmans");
|
2000-07-26 13:41:38 +08:00
|
|
|
|
CREDIT_LINE("CURL", "Sterling Hughes");
|
1999-12-07 10:49:03 +08:00
|
|
|
|
CREDIT_LINE("CyberCash", "Evan Klinger");
|
1999-07-18 03:17:42 +08:00
|
|
|
|
CREDIT_LINE("Win32 COM", "Zeev Suraski");
|
1999-07-20 02:37:42 +08:00
|
|
|
|
CREDIT_LINE("DAV", "Stig Bakken");
|
1999-07-19 22:07:10 +08:00
|
|
|
|
CREDIT_LINE("DBA", "Sascha Schumann");
|
1999-07-18 03:17:42 +08:00
|
|
|
|
CREDIT_LINE("DBM", "Rasmus Lerdorf, Jim Winstead");
|
|
|
|
|
CREDIT_LINE("dBase", "Jim Winstead");
|
|
|
|
|
CREDIT_LINE("FDF", "Uwe Steinmann");
|
|
|
|
|
CREDIT_LINE("FilePro", "Chad Robinson");
|
2000-02-21 22:35:28 +08:00
|
|
|
|
CREDIT_LINE("FTP", "Andrew Skalski");
|
2000-05-13 04:11:14 +08:00
|
|
|
|
CREDIT_LINE("GD imaging", "Rasmus Lerdorf, Stig Bakken, Jim Winstead, Jouni Ahto");
|
1999-07-18 03:17:42 +08:00
|
|
|
|
CREDIT_LINE("GetText", "Alex Plotnick");
|
|
|
|
|
CREDIT_LINE("HyperWave", "Uwe Steinmann");
|
2000-02-21 22:50:41 +08:00
|
|
|
|
CREDIT_LINE("IMAP", "Rex Logan, Mark Musone, Brian Wang, Kaj-Michael Lang, Antoni Pamies Olive, Rasmus Lerdorf, Andrew Skalski, Chuck Hagenbuch");
|
2000-05-13 04:11:14 +08:00
|
|
|
|
CREDIT_LINE("Informix", "Danny Heijl, Christian Cartus");
|
1999-11-18 11:03:24 +08:00
|
|
|
|
CREDIT_LINE("Java", "Sam Ruby");
|
2000-05-13 04:11:14 +08:00
|
|
|
|
CREDIT_LINE("InterBase", "Jouni Ahto, Andrew Avdeev");
|
1999-07-18 03:17:42 +08:00
|
|
|
|
CREDIT_LINE("LDAP", "Amitay Isaacs, Eric Warnke, Rasmus Lerdorf, Gerrit Thomson");
|
2000-02-21 22:50:41 +08:00
|
|
|
|
CREDIT_LINE("MCAL", "Mark Musone, Chuck Hagenbuch");
|
1999-07-18 03:17:42 +08:00
|
|
|
|
CREDIT_LINE("mcrypt", "Sascha Schumann");
|
|
|
|
|
CREDIT_LINE("mhash", "Sascha Schumann");
|
1999-11-23 03:10:14 +08:00
|
|
|
|
CREDIT_LINE("MS SQL", "Frank M. Kromann");
|
1999-07-18 03:17:42 +08:00
|
|
|
|
CREDIT_LINE("mSQL", "Zeev Suraski");
|
|
|
|
|
CREDIT_LINE("MySQL", "Zeev Suraski");
|
1999-07-20 02:37:42 +08:00
|
|
|
|
CREDIT_LINE("OCI8", "Stig Bakken, Thies C. Arntzen");
|
|
|
|
|
CREDIT_LINE("ODBC", "Stig Bakken, Andreas Karajannis, Frank M. Kromann");
|
|
|
|
|
CREDIT_LINE("Oracle", "Stig Bakken, Mitch Golden, Rasmus Lerdorf, Andreas Karajannis, Thies C. Arntzen");
|
1999-10-01 22:54:55 +08:00
|
|
|
|
CREDIT_LINE("Perl Compatible Regexps", "Andrei Zmievski");
|
1999-07-18 03:17:42 +08:00
|
|
|
|
CREDIT_LINE("PDF", "Uwe Steinmann");
|
2000-05-25 19:01:31 +08:00
|
|
|
|
CREDIT_LINE("Posix", "Kristian K<>hntopp");
|
1999-07-18 03:17:42 +08:00
|
|
|
|
CREDIT_LINE("PostgreSQL", "Jouni Ahto, Zeev Suraski");
|
2000-03-16 10:18:24 +08:00
|
|
|
|
CREDIT_LINE("Readline", "Thies C. Arntzen");
|
2000-05-25 19:01:31 +08:00
|
|
|
|
CREDIT_LINE("Recode", "Kristian K<>hntopp");
|
1999-10-01 22:54:55 +08:00
|
|
|
|
CREDIT_LINE("Sessions", "Sascha Schumann, Andrei Zmievski");
|
1999-07-18 03:17:42 +08:00
|
|
|
|
CREDIT_LINE("SNMP", "Rasmus Lerdorf");
|
2000-05-13 04:49:26 +08:00
|
|
|
|
CREDIT_LINE("SWF", "Sterling Hughes");
|
1999-07-18 03:17:42 +08:00
|
|
|
|
CREDIT_LINE("Sybase", "Zeev Suraski");
|
|
|
|
|
CREDIT_LINE("System V Shared Memory", "Christian Cartus");
|
|
|
|
|
CREDIT_LINE("System V Semaphores", "Tom May");
|
1999-10-01 22:54:55 +08:00
|
|
|
|
CREDIT_LINE("WDDX", "Andrei Zmievski");
|
1999-09-25 02:02:58 +08:00
|
|
|
|
CREDIT_LINE("XML", "Stig Bakken, Thies C. Arntzen");
|
1999-07-18 03:17:42 +08:00
|
|
|
|
CREDIT_LINE("Yellow Pages", "Stephanie Wehner");
|
1999-08-07 23:50:26 +08:00
|
|
|
|
CREDIT_LINE("Zlib", "Rasmus Lerdorf, Stefan Roehrich");
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_info_print_table_end();
|
1999-07-18 03:17:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (flag & PHP_CREDITS_DOCS) {
|
2000-04-15 02:22:43 +08:00
|
|
|
|
php_info_print_table_start();
|
|
|
|
|
php_info_print_table_header(1, "PHP Documentation Team");
|
2000-04-15 05:12:21 +08:00
|
|
|
|
php_info_print_table_row(1, "Alexander Aulbach, Stig Bakken, Rasmus Lerdorf, Egon Schmid, Zeev Suraski, Lars Torben Wilson, Jim Winstead");
|
2000-04-18 02:57:40 +08:00
|
|
|
|
php_info_print_table_row(1, "Edited by: Stig Bakken and Egon Schmid");
|
2000-04-15 02:22:43 +08:00
|
|
|
|
php_info_print_table_end();
|
1999-07-18 03:17:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
2000-06-09 09:50:44 +08:00
|
|
|
|
PUTS("</center>");
|
|
|
|
|
|
1999-07-18 03:17:42 +08:00
|
|
|
|
if (flag & PHP_CREDITS_FULLPAGE) {
|
2000-06-09 09:50:44 +08:00
|
|
|
|
PUTS("</body></html>\n");
|
1999-07-18 03:17:42 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2000-04-06 04:17:02 +08:00
|
|
|
|
PHPAPI void php_info_print_table_start()
|
|
|
|
|
{
|
|
|
|
|
php_printf("<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=1 WIDTH=600 BGCOLOR=\"#000000\">\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PHPAPI void php_info_print_table_end()
|
|
|
|
|
{
|
|
|
|
|
php_printf("</TABLE><BR>\n");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PHPAPI void php_info_print_box_start(int flag)
|
|
|
|
|
{
|
|
|
|
|
php_info_print_table_start();
|
|
|
|
|
if (flag) {
|
|
|
|
|
php_printf("<TR VALIGN=\"middle\" BGCOLOR=\"" PHP_HEADER_COLOR "\"><TD ALIGN=\"left\">\n");
|
|
|
|
|
} else {
|
|
|
|
|
php_printf("<TR VALIGN=\"top\" BGCOLOR=\"" PHP_CONTENTS_COLOR "\"><TD ALIGN=\"left\">\n");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PHPAPI void php_info_print_box_end()
|
|
|
|
|
{
|
|
|
|
|
php_printf("</TD></TR>\n");
|
|
|
|
|
php_info_print_table_end();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PHPAPI void php_info_print_hr()
|
|
|
|
|
{
|
|
|
|
|
php_printf("<HR NOSHADE SIZE=1 WIDTH=600>\n");
|
|
|
|
|
}
|
|
|
|
|
|
2000-04-08 00:41:19 +08:00
|
|
|
|
PHPAPI void php_info_print_table_colspan_header(int num_cols, char *header)
|
|
|
|
|
{
|
|
|
|
|
php_printf("<TR BGCOLOR=\"" PHP_HEADER_COLOR "\"><TH COLSPAN=%d>%s</TH></TR>\n", num_cols, header );
|
|
|
|
|
}
|
2000-04-06 04:17:02 +08:00
|
|
|
|
|
1999-07-18 03:17:42 +08:00
|
|
|
|
|
1999-05-09 16:48:05 +08:00
|
|
|
|
PHPAPI void php_info_print_table_header(int num_cols, ...)
|
|
|
|
|
{
|
|
|
|
|
int i;
|
|
|
|
|
va_list row_elements;
|
|
|
|
|
char *row_element;
|
|
|
|
|
|
|
|
|
|
va_start(row_elements, num_cols);
|
|
|
|
|
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_printf("<TR VALIGN=\"bottom\" bgcolor=\"" PHP_HEADER_COLOR "\">");
|
1999-05-09 16:48:05 +08:00
|
|
|
|
for (i=0; i<num_cols; i++) {
|
|
|
|
|
row_element = va_arg(row_elements, char *);
|
|
|
|
|
if (!row_element || !*row_element) {
|
|
|
|
|
row_element = " ";
|
|
|
|
|
}
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_printf("<TH>%s</TH>", row_element);
|
1999-05-09 16:48:05 +08:00
|
|
|
|
}
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_printf("</TR>\n");
|
1999-05-09 16:48:05 +08:00
|
|
|
|
|
|
|
|
|
va_end(row_elements);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PHPAPI void php_info_print_table_row(int num_cols, ...)
|
|
|
|
|
{
|
|
|
|
|
int i;
|
|
|
|
|
va_list row_elements;
|
|
|
|
|
char *row_element;
|
|
|
|
|
|
|
|
|
|
va_start(row_elements, num_cols);
|
|
|
|
|
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_printf("<TR VALIGN=\"baseline\" BGCOLOR=\"" PHP_CONTENTS_COLOR "\">");
|
1999-05-09 16:48:05 +08:00
|
|
|
|
for (i=0; i<num_cols; i++) {
|
|
|
|
|
row_element = va_arg(row_elements, char *);
|
|
|
|
|
if (!row_element || !*row_element) {
|
|
|
|
|
row_element = " ";
|
|
|
|
|
}
|
2000-04-06 04:48:46 +08:00
|
|
|
|
php_printf("<TD %s>%s%s%s</td>",
|
2000-06-17 15:08:53 +08:00
|
|
|
|
(i==0?"BGCOLOR=\"" PHP_ENTRY_NAME_COLOR "\" ":"ALIGN=\"left\""),
|
2000-04-06 04:17:02 +08:00
|
|
|
|
(i==0?"<B>":""),
|
|
|
|
|
row_element,
|
|
|
|
|
(i==0?"</B>":""));
|
1999-05-09 16:48:05 +08:00
|
|
|
|
}
|
2000-04-06 04:17:02 +08:00
|
|
|
|
php_printf("</TR>\n");
|
1999-05-09 16:48:05 +08:00
|
|
|
|
|
|
|
|
|
va_end(row_elements);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
1999-07-15 00:02:10 +08:00
|
|
|
|
|
|
|
|
|
void register_phpinfo_constants(INIT_FUNC_ARGS)
|
|
|
|
|
{
|
|
|
|
|
REGISTER_LONG_CONSTANT("INFO_GENERAL", PHP_INFO_GENERAL, CONST_PERSISTENT|CONST_CS);
|
|
|
|
|
REGISTER_LONG_CONSTANT("INFO_CREDITS", PHP_INFO_CREDITS, CONST_PERSISTENT|CONST_CS);
|
|
|
|
|
REGISTER_LONG_CONSTANT("INFO_CONFIGURATION", PHP_INFO_CONFIGURATION, CONST_PERSISTENT|CONST_CS);
|
|
|
|
|
REGISTER_LONG_CONSTANT("INFO_MODULES", PHP_INFO_MODULES, CONST_PERSISTENT|CONST_CS);
|
|
|
|
|
REGISTER_LONG_CONSTANT("INFO_ENVIRONMENT", PHP_INFO_ENVIRONMENT, CONST_PERSISTENT|CONST_CS);
|
|
|
|
|
REGISTER_LONG_CONSTANT("INFO_VARIABLES", PHP_INFO_VARIABLES, CONST_PERSISTENT|CONST_CS);
|
|
|
|
|
REGISTER_LONG_CONSTANT("INFO_LICENSE", PHP_INFO_LICENSE, CONST_PERSISTENT|CONST_CS);
|
|
|
|
|
REGISTER_LONG_CONSTANT("INFO_ALL", PHP_INFO_ALL, CONST_PERSISTENT|CONST_CS);
|
2000-02-19 01:59:44 +08:00
|
|
|
|
REGISTER_LONG_CONSTANT("CREDITS_GROUP", PHP_CREDITS_GROUP, CONST_PERSISTENT|CONST_CS);
|
|
|
|
|
REGISTER_LONG_CONSTANT("CREDITS_GENERAL", PHP_CREDITS_GENERAL, CONST_PERSISTENT|CONST_CS);
|
|
|
|
|
REGISTER_LONG_CONSTANT("CREDITS_SAPI", PHP_CREDITS_SAPI, CONST_PERSISTENT|CONST_CS);
|
|
|
|
|
REGISTER_LONG_CONSTANT("CREDITS_MODULES", PHP_CREDITS_MODULES, CONST_PERSISTENT|CONST_CS);
|
|
|
|
|
REGISTER_LONG_CONSTANT("CREDITS_DOCS", PHP_CREDITS_DOCS, CONST_PERSISTENT|CONST_CS);
|
|
|
|
|
REGISTER_LONG_CONSTANT("CREDITS_FULLPAGE", PHP_CREDITS_FULLPAGE, CONST_PERSISTENT|CONST_CS);
|
|
|
|
|
REGISTER_LONG_CONSTANT("CREDITS_ALL", PHP_CREDITS_ALL, CONST_PERSISTENT|CONST_CS);
|
1999-07-15 00:02:10 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2000-06-17 02:24:02 +08:00
|
|
|
|
/* {{{ proto void phpinfo([int what])
|
1999-04-17 08:37:12 +08:00
|
|
|
|
Output a page of useful information about PHP and the current request */
|
1999-07-18 03:17:42 +08:00
|
|
|
|
PHP_FUNCTION(phpinfo)
|
1999-04-17 08:37:12 +08:00
|
|
|
|
{
|
1999-07-15 00:02:10 +08:00
|
|
|
|
int flag;
|
1999-12-14 11:48:46 +08:00
|
|
|
|
zval **flag_arg;
|
1999-07-15 00:02:10 +08:00
|
|
|
|
|
|
|
|
|
|
2000-06-06 03:47:54 +08:00
|
|
|
|
switch (ZEND_NUM_ARGS()) {
|
1999-07-15 00:02:10 +08:00
|
|
|
|
case 0:
|
|
|
|
|
flag = 0xFFFFFFFF;
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
1999-12-19 06:40:35 +08:00
|
|
|
|
if (zend_get_parameters_ex(1, &flag_arg)==FAILURE) {
|
1999-07-15 00:02:10 +08:00
|
|
|
|
RETURN_FALSE;
|
|
|
|
|
}
|
1999-12-14 11:48:46 +08:00
|
|
|
|
convert_to_long_ex(flag_arg);
|
|
|
|
|
flag = (*flag_arg)->value.lval;
|
1999-07-15 00:02:10 +08:00
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
WRONG_PARAM_COUNT;
|
|
|
|
|
break;
|
|
|
|
|
}
|
1999-07-18 03:17:42 +08:00
|
|
|
|
php_print_info(flag);
|
1999-04-17 08:37:12 +08:00
|
|
|
|
RETURN_TRUE;
|
|
|
|
|
}
|
1999-12-14 11:48:46 +08:00
|
|
|
|
|
1999-04-17 08:37:12 +08:00
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
|
/* {{{ proto string phpversion(void)
|
|
|
|
|
Return the current PHP version */
|
1999-07-18 03:17:42 +08:00
|
|
|
|
PHP_FUNCTION(phpversion)
|
1999-04-17 08:37:12 +08:00
|
|
|
|
{
|
|
|
|
|
RETURN_STRING(PHP_VERSION,1);
|
|
|
|
|
}
|
|
|
|
|
/* }}} */
|
|
|
|
|
|
1999-07-18 03:17:42 +08:00
|
|
|
|
|
2000-07-09 03:31:16 +08:00
|
|
|
|
/* {{{ proto void phpcredits([int flag])
|
1999-07-18 03:17:42 +08:00
|
|
|
|
Prints the list of people who've contributed to the PHP project */
|
|
|
|
|
PHP_FUNCTION(phpcredits)
|
|
|
|
|
{
|
|
|
|
|
int flag;
|
1999-12-14 11:48:46 +08:00
|
|
|
|
zval **flag_arg;
|
1999-07-18 03:17:42 +08:00
|
|
|
|
|
|
|
|
|
|
2000-06-06 03:47:54 +08:00
|
|
|
|
switch (ZEND_NUM_ARGS()) {
|
1999-07-18 03:17:42 +08:00
|
|
|
|
case 0:
|
|
|
|
|
flag = 0xFFFFFFFF;
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
1999-12-19 06:40:35 +08:00
|
|
|
|
if (zend_get_parameters_ex(1, &flag_arg)==FAILURE) {
|
1999-07-18 03:17:42 +08:00
|
|
|
|
RETURN_FALSE;
|
|
|
|
|
}
|
1999-12-14 11:48:46 +08:00
|
|
|
|
convert_to_long_ex(flag_arg);
|
|
|
|
|
flag = (*flag_arg)->value.lval;
|
1999-07-18 03:17:42 +08:00
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
WRONG_PARAM_COUNT;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
php_print_credits(flag);
|
|
|
|
|
RETURN_TRUE;
|
|
|
|
|
}
|
1999-12-14 11:48:46 +08:00
|
|
|
|
|
1999-07-18 03:17:42 +08:00
|
|
|
|
/* }}} */
|
|
|
|
|
|
1999-12-22 04:35:43 +08:00
|
|
|
|
|
|
|
|
|
PHP_FUNCTION(php_logo_guid)
|
|
|
|
|
{
|
|
|
|
|
RETURN_STRINGL(PHP_LOGO_GUID, sizeof(PHP_LOGO_GUID)-1, 1);
|
|
|
|
|
}
|
|
|
|
|
|
2000-04-20 07:17:02 +08:00
|
|
|
|
PHP_FUNCTION(php_egg_logo_guid)
|
|
|
|
|
{
|
|
|
|
|
RETURN_STRINGL(PHP_EGG_LOGO_GUID, sizeof(PHP_EGG_LOGO_GUID)-1, 1);
|
|
|
|
|
}
|
|
|
|
|
|
1999-12-22 04:35:43 +08:00
|
|
|
|
|
|
|
|
|
PHP_FUNCTION(zend_logo_guid)
|
|
|
|
|
{
|
|
|
|
|
RETURN_STRINGL(ZEND_LOGO_GUID, sizeof(ZEND_LOGO_GUID)-1, 1);
|
|
|
|
|
}
|
|
|
|
|
|
2000-06-26 22:43:37 +08:00
|
|
|
|
/* {{{ proto string sapi_module_name(void)
|
|
|
|
|
Return the current SAPI module name */
|
|
|
|
|
PHP_FUNCTION(php_sapi_name)
|
|
|
|
|
{
|
2000-06-26 22:55:38 +08:00
|
|
|
|
if (sapi_module.name) {
|
2000-06-26 22:43:37 +08:00
|
|
|
|
RETURN_STRING(sapi_module.name,1);
|
2000-06-26 22:55:38 +08:00
|
|
|
|
} else {
|
2000-06-26 22:43:37 +08:00
|
|
|
|
RETURN_FALSE;
|
2000-06-26 22:55:38 +08:00
|
|
|
|
}
|
2000-06-26 22:43:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* }}} */
|
|
|
|
|
|
1999-04-17 08:37:12 +08:00
|
|
|
|
/*
|
|
|
|
|
* Local variables:
|
|
|
|
|
* tab-width: 4
|
|
|
|
|
* c-basic-offset: 4
|
|
|
|
|
* End:
|
|
|
|
|
*/
|