note 93247 added to function.highlight-string
| From: | bleakwind at gmail dot com | Date: | Sun, 30 Aug 2009 13:13:31 +0000 |
| Subject: | note 93247 added to function.highlight-string | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-160047@lists.php.net to get a copy of this message | ||
If you use line by line, it's the wrong way,use this:
<?php
// Bleakwind (www.weaverdream.com)
$file_content = file_get_contents("E:/www/test.php");
$file_content = highlight_string($file_content, "1");
// $file_content = highlight_file("E:/www/test.php", "1");
$file_count = count(explode("<br />", $file_content));
echo "<table cellpadding=\"1\" cellspacing=\"0\"
border=\"0\">";
echo "<tr>";
echo "<td bgcolor=\"#EEEEEE\" align=\"right\"
valign=\"top\">";
for ($i = 1; $i <= $file_count; $i++) {
echo $i."<br />";
}
echo "</td>";
echo "<td align=\"left\" valign=\"top\">";
echo $file_content;
echo "</td>";
echo "</tr>";
echo "</table>";
?>
----
Server IP: 222.73.227.205
Probable Submitter: 116.30.88.42
----
Manual Page -- http://www.php.net/manual/en/function.highlight-string.php
Edit -- https://master.php.net/note/edit/93247
Del: integrated -- https://master.php.net/note/delete/93247/integrated
Del: useless -- https://master.php.net/note/delete/93247/useless
Del: bad code -- https://master.php.net/note/delete/93247/bad+code
Del: spam -- https://master.php.net/note/delete/93247/spam
Del: non-english -- https://master.php.net/note/delete/93247/non-english
Del: in docs -- https://master.php.net/note/delete/93247/in+docs
Del: other reasons-- https://master.php.net/note/delete/93247
Reject -- https://master.php.net/note/reject/93247
Search -- https://master.php.net/manage/user-notes.php