dolibarr  7.0.0-beta
phpinfo.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
4  * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
5  * Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
26 require '../../main.inc.php';
27 require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
28 require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
29 
30 $langs->load("admin");
31 
32 if (! $user->admin)
34 
35 
36 
37 /*
38  * View
39  */
40 
41 llxHeader();
42 
43 $title='InfoPHP';
44 
45 if (isset($title))
46 {
47  print load_fiche_titre($langs->trans($title), '', 'title_setup');
48 }
49 
50 
51 
52 print '<table class="noborder" width="100%">';
53 print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
54 print "\n";
55 
56 $var=false;
57 
58 // Recupere la version de PHP
59 $phpversion=version_php();
60 print '<tr class="oddeven"><td width="220px">'.$langs->trans("Version")."</td><td>".$phpversion."</td></tr>\n";
61 
62 print '</table>';
63 print '<br>';
64 
65 
66 
67 // Get php_info array
68 $phparray=phpinfo_array();
69 foreach($phparray as $key => $value)
70 {
71  print '<div class="div-table-responsive-no-min">';
72  print '<table class="noborder">';
73  print '<tr class="liste_titre">';
74  //print '<td width="220px">'.$langs->trans("Parameter").'</td>';
75  print '<td width="220px">'.$key.'</td>';
76  print '<td colspan="2">'.$langs->trans("Value").'</td>';
77  print "</tr>\n";
78 
79  //var_dump($value);
80  foreach($value as $keyparam => $keyvalue)
81  {
82  if (! is_array($keyvalue))
83  {
84  print '<tr class="oddeven">';
85  print '<td>'.$keyparam.'</td>';
86  $valtoshow=$keyvalue;
87  if ($keyparam == 'X-ChromePhp-Data') $valtoshow=dol_trunc($keyvalue,80);
88  print '<td colspan="2">';
89  if ($keyparam == 'Path') $valtoshow=implode('; ',explode(';',trim($valtoshow)));
90  if ($keyparam == 'PATH') $valtoshow=implode('; ',explode(';',trim($valtoshow)));
91  if ($keyparam == '_SERVER["PATH"]') $valtoshow=implode('; ',explode(';',trim($valtoshow)));
92  print $valtoshow;
93  print '</td>';
94  print '</tr>';
95  }
96  else
97  {
98  print '<tr class="oddeven">';
99  print '<td>'.$keyparam.'</td>';
100  $i=0;
101  foreach($keyvalue as $keyparam2 => $keyvalue2)
102  {
103  print '<td>';
104  $valtoshow=$keyvalue2;
105  if ($keyparam == 'disable_functions') $valtoshow=implode(', ',explode(',',trim($valtoshow)));
106  //print $keyparam;
107  print $valtoshow;
108  $i++;
109  print '</td>';
110  }
111  print '</tr>';
112  }
113  }
114  print '</table>';
115  print '</div>';
116  print '<br>';
117 }
118 
119 
120 llxFooter();
121 
122 $db->close();
llxFooter()
Empty footer.
Definition: wrapper.php:58
dol_trunc($string, $size=40, $trunc='right', $stringencoding='UTF-8', $nodot=0, $display=0)
Truncate a string to a particular length adding '...' if string larger than length.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
if($_POST["cancel"]==$langs->trans("Cancel")&&!$id) if($action== 'setdatev'&&$user->rights->tax->charges->creer) if($action== 'add'&&$_POST["cancel"]<> $langs->trans("Cancel")) if($action== 'delete') $title
Actions.
Definition: card.php:183
load_fiche_titre($titre, $morehtmlright='', $picto='title_generic.png', $pictoisfullpath=0, $id=0, $morecssontable='', $morehtmlcenter='')
Load a title with picto.
llxHeader()
Empty header.
Definition: wrapper.php:46
phpinfo_array()
Return the php_info into an array.
Definition: admin.lib.php:1572
version_php()
Return PHP version.
print
Draft customers invoices.
Definition: index.php:91