Last active
August 11, 2016 12:53
-
-
Save foozlereducer/b91eff0748bd7ad9b6249e27b0534841 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // The path to the file written out from xdebug | |
| $path_and_filename = '/usr/srv/www/data.txt'; | |
| // get the data written out from xdebug | |
| $data = file_get_contents ( $path_and_filename ); | |
| // The path to our output file | |
| $output_path_and_filename = '/usr/srv/www/output.txt'; | |
| // open the file | |
| $fp = fopen( $output_path_and_filename, 'a' ); | |
| // append data to it. | |
| fwrite($fp, $data ); | |
| fwrite($fp, '<hr/><hr/>'); | |
| fclose($fp); | |
| $output = file_get_contents ( $output_path_and_filename ); | |
| if ( $output ) { | |
| ?> | |
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Memory Report</title> | |
| <meta name="description" content="Memory Report"> | |
| <meta name="author" content="Derek Rethans / Steve Browning ( HTML, PHP )"> | |
| <!--[if lt IE 9]> | |
| <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
| <![endif]--> | |
| </head> | |
| <body> | |
| <?php | |
| echo $output; | |
| ?> | |
| </body> | |
| </html> | |
| <?php | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment