Changeset 4


Ignore:
Timestamp:
05/18/05 16:38:26 (19 years ago)
Author:
nanardon
Message:
  • show the asked file
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/index.php

    r3 r4  
    77</head><body> 
    88<?php if(isset($phpfile)) { 
     9if ($hf = fopen($phpfile, "r")) { 
    910?> 
    10 <?php  
     11<h1>Contenu du fichier  
     12<?php echo $phpfile; 
     13    ?><hr><?php 
     14while (!feof($hf)) { 
     15    $line = fgets($hf); 
     16    echo htmlentities($line). '<br>'; 
     17} 
     18?><hr><?php 
     19pclose($hf); 
     20} else { 
     21    ?>Je ne peux pas ouvrir <?php echo $phpfile; 
     22} 
    1123} else { //si fichier demandé 
    1224?> 
     
    3446?> 
    3547 
    36 <li><a href="<?php echo $file?>"><?php echo htmlentities($file) ?></a></li> 
     48<li> 
     49<a href="<?php echo $file?>"><?php echo htmlentities($file) ?></a> 
     50<a href="<?php echo "$PHP_SELF?phpfile=" . urlencode($file) ?>">voir le source</a> 
     51</li> 
    3752 
    3853<?php  
Note: See TracChangeset for help on using the changeset viewer.