Login   Register  
PHP Classes
elePHPant
Icontem

File: testFile.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Preslav Panayotov  >  PHP File Manipulation  >  testFile.php  >  Download  
File: testFile.php
Role: Example script
Content type: text/plain
Description: Test File
Class: PHP File Manipulation
Manipulate files and directories
Author: By
Last change:
Date: 1 year ago
Size: 538 bytes
 

Contents

Class file image Download
<?php
//Including File
include "File.php";


//File and data 
$p './text.txt';
$data 'TEST VORTEX PRESLAV PANAYOTOV';

// GENERATING  Instance
$file = new File();

//Creating and writeing a file;
$write_to_file $file->setFile($p)->write_file($data,'x+b');

var_dump($write_to_file);


//Listing directory and  cleaning old data
$file->__clean();
$file->setFile('./');
var_dump($file->listFiles(2,true));


// Reading data from file
$file->__clean();
$file->setFile($p);
var_dump($file->read_file());