Z.N.S.: Quellcode anzeigen

Beitrag lesen

abend,

mit PHP gehts zB ua so:

<?php
ob_start();
// Show source of file
show_source ( 'C:/WINNT/php.ini' );
$contents = ob_get_contents();
ob_end_clean();

$contents = explode('<br>', $contents);
foreach ($contents as $line){
    $i++ ;
    $line_number = $i.str_repeat(" ",6-strlen($i));
    echo '<font color="cccccc"><li>'.$line_number.'</li></font> '.$line.'<br>';
}
?>
und schon erscheint die php.ini im browser...

mfg,
(tanz das)
Z.N.S.

--
<img src="http://www.dmp-web.de/comunicout/neubauten.gif" border="0" alt="">