Php - Dosya Arama

    Php - Dosya Arama

    Php Dosya Arama<html>
    <body>

    <?php

    if (empty ($ara) ): ?>

    <form action="<? echo $PHP_SELF; ?>" method="post">
    <input type="text" name="ara">
    <input type="submit" value="Ara">
    </form>

    <?

    else:

    $klasor = "/apache/htdocs" ;
    $klasor_ac = opendir ($klasor);

    while ( $file = readdir ($klasor_ac ) ) {


    if (stristr ($file, ".php") || stristr ($file, ".htm") ) {

    $ac[$i] = @fopen ($file, 'r');
    $oku[$i] = fread ( $ac[$i], filesize ($file) );

    if ( eregi ($ara, $oku[$i] ) ) {
    echo "$file<br> ";
    }

    }

    $i++;
    }

    closedir ($klasor_ac);

    endif;

    ?>

    </body>
    </html>


[ Geri ] - [ Ana Sayfa ] - Bookmark and Share


travesti