Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 24 lines (21 sloc) 0.651 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
<?PHP
    require_once 'Stream/Var.php';
    stream_wrapper_register( "var", "Stream_Var" );

    $dirname = 'var://_SERVER';
    $dir = opendir($dirname);
    echo "<strong>opening directory '$dirname'</strong><br><br>";

    while ($entry = readdir($dir)) {
        echo "opening file $dirname/$entry<br>";
        if (!$fp = @fopen($dirname."/".$entry,"r")) {
            echo "seems to be a directory<br><br>";
            continue;
        }
           
        echo "reading from $entry<br>";
        while (!feof($fp)) {
            echo fread($fp, 16);
        }
        fclose($fp);
        echo "<br><br>";
    }
    closedir($dir);
?>
Something went wrong with that request. Please try again.