aboutsummaryrefslogtreecommitdiff
path: root/srcs/phpmyadmin/phpinfo.php
blob: bf4ad8fe388dcbcf388c81d41939f088c13a7c16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
 * phpinfo() wrapper to allow displaying only when configured to do so.
 *
 * @package PhpMyAdmin
 */
declare(strict_types=1);

if (! defined('ROOT_PATH')) {
    define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
}

/**
 * Gets core libraries and defines some variables
 */
require_once ROOT_PATH . 'libraries/common.inc.php';
$response = PhpMyAdmin\Response::getInstance();
$response->disable();
$response->getHeader()->sendHttpHeaders();

/**
 * Displays PHP information
 */
if ($GLOBALS['cfg']['ShowPhpInfo']) {
    phpinfo(INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES);
}