1. <html>
  2. <head>
  3. <title> source _src </title>
  4. <meta charset="utf-8">
  5. <?php
  6. $source=$_GET["src"];
  7. ?>
  8. </head>
  9. <body>
  10. <?php
  11. if (!$fic_source=@fopen($source,'r')){
  12. echo "Fichier ".$source." inaccessible!<br>";
  13. $fic_source=fopen("cercle.php",'r');
  14. }
  15. echo "<code>";
  16. echo "<ol>";
  17. while (!feof($fic_source)){
  18. $ligne_fic=fgets($fic_source);
  19. $nbtab=substr_count($ligne_fic,"\t");
  20. echo "<li><span style=\"margin-left: ".strval($nbtab*30)."px\">".htmlentities($ligne_fic)."</span></li>";
  21. echo "";
  22. }
  23. echo "</ol>";
  24. echo "</code>";
  25. fclose($fic_source);
  26. ?>
  27. </body>
  28. </html>