Source Viewers
|
|
|
|
<?
/*
Source code view with syntac higlight using
highlight_string() PHP4 function.
by : iwyrobi [iwyrobi@yahoo.com]
*/
function source($source)
{
clearstatcache();
if(!file_exists($source))
{
return 1;
}
$handle=fopen($source,"r"); // open source code
$size=filesize($source);
$temp=fread($handle,$size);
echo "<B><FONT size=2>";
$colorcode=highlight_string($temp); // give the color
echo "</font></b>";
return 0;
}
source("somecode.php");
|
|
|
Usage Example
|
|
|
Rate This Script
|
|
|
|