Working with file - PHP class

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Working with file - PHP class

    UPDATE: FILE.CLASS.PHP 2.0

    Because of $file::load() useless I rewrote the class, where I added some new things.
    Simple eg:
    PHP Code:
    <?php
    require('file.class.php');

    $f = new file;

    $filename 'Folder/Folder2/Folder2/file.txt';

    $f->validate($filename);

    $f->write_file('HI'$filenameLINE_BY_LINEERASE); // LINE_BY_LINE | SINGLE_LINE  AND ERASE | DONT_ERASE

    $array $f->read_file($filenameARRAY_READ); // OR FULL_READ

    foreach ($array AS $a)
    {
        echo 
    $a.'<br/>';
    }

    $f->dir_tree('Folder/'); // will return an array with all files from that dir and its subdirs

    $f->delete_dir('Folder/'); // all files and subfolders from Folder will be deleted
    ?>
    TODO:
    MYSQL LIKE FLAT FILE DATABASE system
    CLONE FILE
    MOVE POINTER IN FILE


    Known Bugs: 0. Report it.

    For more info read the comments from file.class.php or Tutorial.jpg

    Thx;
    Attached Files
    Last edited by i0nutzxp; 11.07.11, 11:09.
    <?php unlink('World/Europe/Romania.country'); ?>

    #2
    make this downloadable, i may have use for it yet

    Comment


      #3
      Class updated!
      <?php unlink('World/Europe/Romania.country'); ?>

      Comment

      Working...
      X