3 * phpinfo() wrapper to allow displaying only when configured to do so.
6 declare(strict_types
=1);
8 namespace PhpMyAdmin\Controllers
;
10 use PhpMyAdmin\Config
;
11 use PhpMyAdmin\Http\ServerRequest
;
15 use const INFO_CONFIGURATION
;
16 use const INFO_GENERAL
;
17 use const INFO_MODULES
;
20 * phpinfo() wrapper to allow displaying only when configured to do so.
22 class PhpInfoController
extends AbstractController
24 public function __invoke(ServerRequest
$request): void
26 $this->response
->disable();
27 $this->response
->getHeader()->sendHttpHeaders();
29 if (! Config
::getInstance()->settings
['ShowPhpInfo']) {
33 phpinfo(INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES
);