Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Čihař <michal@cihar.com>2017-01-07 16:22:14 +0300
committerMichal Čihař <michal@cihar.com>2017-01-07 16:22:14 +0300
commit93e354c2e33347a138234d236b2e987a7f092b14 (patch)
treed528a285411c70c04dd4fa5034beb0781cc09ffc /phpinfo.php
parentfee3923f488e34ce4e9d93c01ba2006c10add4b7 (diff)
Revert "Remove option to show phpinfo() ($cfg['ShowPhpInfo'])"
This reverts commit e67e69229a1df3a26df12b1bae89065834fd85b4.
Diffstat (limited to 'phpinfo.php')
-rw-r--r--phpinfo.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/phpinfo.php b/phpinfo.php
new file mode 100644
index 0000000000..6ac84c7ea4
--- /dev/null
+++ b/phpinfo.php
@@ -0,0 +1,22 @@
+<?php
+/* vim: set expandtab sw=4 ts=4 sts=4: */
+/**
+ * phpinfo() wrapper to allow displaying only when configured to do so.
+ *
+ * @package PhpMyAdmin
+ */
+
+/**
+ * Gets core libraries and defines some variables
+ */
+require_once 'libraries/common.inc.php';
+$response = PMA\libraries\Response::getInstance();
+$response->disable();
+$response->getHeader()->sendHttpHeaders();
+
+/**
+ * Displays PHP information
+ */
+if ($GLOBALS['cfg']['ShowPhpInfo']) {
+ phpinfo();
+}