PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
  Classes of Ethan Sterling  >  File Writer  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example usage
Class: File Writer
Write to files safely
Author: By
Last change:
Date: 10 years ago
Size: 279 bytes
 

 

Contents

Class file image Download
<?PHP
//Include the main class file
include("main.php");

//Create a new file_writer object
$file = new file_writer;

//Write to a new file
$file->write("test.txt", "Test Test Test");

//Append more text to the file
$file->append("test.txt", "\r\nTest Test Test");
?>