You are here

private function InstapageCmsPluginDebugLogModel::getPhpInfoHTML in Instapage plugin 8.3

Same name and namespace in other branches
  1. 7.3 core/models/InstapageCmsPluginDebugLogModel.php \InstapageCmsPluginDebugLogModel::getPhpInfoHTML()

Gets phpinfo and formats it.

Return value

string Info about PHP in HTML format.

1 call to InstapageCmsPluginDebugLogModel::getPhpInfoHTML()
InstapageCmsPluginDebugLogModel::getLogHTML in core/models/InstapageCmsPluginDebugLogModel.php
Gets the HTML with debug log. Template for th og is in /templates/log.php file.

File

core/models/InstapageCmsPluginDebugLogModel.php, line 143

Class

InstapageCmsPluginDebugLogModel
Class responsible for storing the data in debug log.

Code

private function getPhpInfoHTML() {
  ob_start();
  phpinfo(INFO_GENERAL | INFO_CREDITS | INFO_CONFIGURATION | INFO_MODULES | INFO_ENVIRONMENT | INFO_VARIABLES);
  $contents = ob_get_contents();
  ob_end_clean();
  $pattern = '/<style.*?style>/s';
  $contents = preg_replace($pattern, '', $contents);
  $contents = '<div class="phpinfo">' . $contents . '</div>';
  return $contents;
}