note 94845 added to function.highlight-file

From: Date: Sat, 28 Nov 2009 01:56:42 +0000
Subject: note 94845 added to function.highlight-file
Groups: php.notes 
Request: Send a blank email to php-notes+get-163356@lists.php.net to get a copy of this message
I use this scipt to open a php file and disply its content highlighted with line numbers <?php function highlight_phps_file($phps_folder,$phps_file) { $hls = ""; ob_start(); echo '<table class="phps_code" width="100%"><tr><td width="20px" valign="top" align="right">'; for ($i = 01; $i <= count(file("".trim($phps_folder)."/".trim($phps_file).".phps")); $i++) { echo '<font class="phps_num">'; if ($i <= 9){ echo "0"; } echo ''.$i.'</font>'; } echo '</td><td valign="top" align="left"'; $highlighted_phps_file = highlight_file("".trim($phps_folder)."/".trim($phps_file).".phps"); echo '</td></tr></table>'; $hls = "".ob_get_contents().""; ob_end_clean(); return $hls; } ?> And yes, i know its dirty ---- Server IP: 69.147.83.197 Probable Submitter: 87.186.87.60 ---- Manual Page -- http://www.php.net/manual/en/function.highlight-file.php Edit -- https://master.php.net/note/edit/94845 Del: integrated -- https://master.php.net/note/delete/94845/integrated Del: useless -- https://master.php.net/note/delete/94845/useless Del: bad code -- https://master.php.net/note/delete/94845/bad+code Del: spam -- https://master.php.net/note/delete/94845/spam Del: non-english -- https://master.php.net/note/delete/94845/non-english Del: in docs -- https://master.php.net/note/delete/94845/in+docs Del: other reasons-- https://master.php.net/note/delete/94845 Reject -- https://master.php.net/note/reject/94845 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#163356) next »