Home  >  Article  >  Backend Development  >  Beautify phpinfo() output content

Beautify phpinfo() output content

WBOY
WBOYOriginal
2016-07-25 08:47:181079browse
通常
  1. date_default_timezone_set('Asia/Shanghai');
  2. ob_start(); phpinfo();
  3. $i = ob_get_contents();
  4. ob_end_clean();
  5. $html = str_replace(
  6. "module_Zend Optimizer", "module_Zend_Optimizer",
  7. preg_replace('%^.*(.*).*$%ms', '$1', $i)
  8. );
  9. $html = str_replace(' width="600"', '', $html);
  10. $str = <<
  11. {$html}
  12. STR;
  13. echo $str;
复制代码


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn