Zend - The PHP Company




Source Viewers

Add Code


Source code viewer with separate highlight function  

Type: application
Added by: phpzen
Entered: 15/09/2004
Last modified: 09/12/2003
Rating: - (fewer than 3 votes)
Views: 4636
Source code viewer with separate highlight function for easily debugging HTML code


    <?

    $fn 
= @$_GET['file'];

    
$x explode("."basename($fn));

    
$ext strtolower($x[sizeof($x)-1]);

    if (
$ext != "htm" && $ext != "html")

    
$src "";

    else

    
$src join(""file($fn));

    include(
"highlight.php");

    echo 
"<CODE>",highlight_html($src),"</CODE>";

    
?>








Usage Example


See the example


Rate This Script





Search



This Category All Categories