* Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** * \file htdocs/admin/system/phpinfo.php * \brief Page des infos systeme de php */ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; $langs->load("admin"); if (! $user->admin) accessforbidden(); /* * View */ llxHeader(); $title='InfoPHP'; if (isset($title)) { print_fiche_titre($langs->trans($title), '', 'title_setup'); } print ''; print ''; print "\n"; $var=false; // Recupere la version de PHP $phpversion=version_php(); print "\n"; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("Version")."".$phpversion."
'; print '
'; // Get php_info array $phparray=phpinfo_array(); foreach($phparray as $key => $value) { //print_titre($key); print ''; print ''; //print ''; print ''; print ''; print "\n"; $var=true; //var_dump($value); foreach($value as $keyparam => $keyvalue) { if (! is_array($keyvalue)) { $var=!$var; print ''; print ''; $valtoshow=$keyvalue; if ($keyparam == 'X-ChromePhp-Data') $valtoshow=dol_trunc($keyvalue,80); print ''; print ''; } else { $var=!$var; print ''; print ''; $i=0; foreach($keyvalue as $keyparam2 => $keyvalue2) { print ''; } print ''; } } print '
'.$langs->trans("Parameter").''.$key.''.$langs->trans("Value").'
'.$keyparam.''; if ($keyparam == 'Path') $valtoshow=join('; ',explode(';',trim($valtoshow))); if ($keyparam == 'PATH') $valtoshow=join('; ',explode(';',trim($valtoshow))); if ($keyparam == '_SERVER["PATH"]') $valtoshow=join('; ',explode(';',trim($valtoshow))); print $valtoshow; print '
'.$keyparam.''; $valtoshow=$keyvalue2; if ($keyparam == 'disable_functions') $valtoshow=join(', ',explode(',',trim($valtoshow))); //print $keyparam; print $valtoshow; $i++; print '

'; } llxFooter(); $db->close();