public SystemInfoController::php()
Returns the contents of phpinfo().
Return value
\Symfony\Component\HttpFoundation\Response A response object to be sent to the client.
File
- core/modules/system/src/Controller/SystemInfoController.php, line 59
Class
- SystemInfoController
- Returns responses for System Info routes.
Namespace
Drupal\system\Controller
Code
public function php() { if (function_exists('phpinfo')) { ob_start(); phpinfo(); $output = ob_get_clean(); } else { $output = t('The phpinfo() function has been disabled for security reasons. For more information, visit <a href=":phpinfo">Enabling and disabling phpinfo()</a> handbook page.', array(':phpinfo' => 'https://www.drupal.org/node/243993')); } return new Response($output); }
Please login to continue.