Write php info to a file - Php

WritePhpInfo to file

Snippet Code


  
Rate this page :
  [ 0 votes]

This function is used to write the phpinfo to a text file.

<?php function phpInfoFile($target_file){ ob_start(); phpinfo(); $phpinfo = ob_get_contents(); ob_end_clean(); $fp = fopen($target_file, "w "); fwrite($fp, $phpinfo); fclose($fp); } ?>

Tags


Ask Questions

Ask Question