PHP Classes

File: description.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Classes of Arthur Tumanyan  >  shagaTail  >  description.php  >  Download  
File: description.php
Role: Documentation
Content type: text/plain
Description: Description
Class: shagaTail
Get the last lines of a file like the tail command
Author: By
Last change:
Date: 8 years ago
Size: 885 bytes


Class file image Download
 <head><title>shagaTail class description</title></head>
<p>This is a simple class for reading files from the end,like Unix 'tail' command.But 
  with some limitations!You can get only the last line<br />
  There are many implementations like this,but this use less memory,than others,i 
  hope... </p>
<p><font size="2" color="#990033">How you can use it?</font> </p>
<p>An example:<br />
  <br />
<pre><font color="#0066FF">&lt;?

 // tail-usage.php
 $myShaga = new shagaTail;
 $myShaga->tailFile = 'filename.log'; //setting the filename
 	$line = $myShaga->getStr();
 	// Analize the line or just print it
 	echo $line."<br />\n";
 	$myShaga->update(); // if the tailed file file is updated,tail it again

<font color="#0066FF"> ?&gt; </font>