PHP Classes
elePHPant
Icontem

File: example_ofile.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Abdulrahman Muhammad  >  Ofile class  >  example_ofile.php  >  Download  
File: example_ofile.php
Role: Example script
Content type: text/plain
Description: example file
Class: Ofile class
Access and split files using a delimiter
Author: By
Last change:
Date: 7 years ago
Size: 1,588 bytes
 

Contents

Class file image Download
<?php
//by saanina
//Abdulrahman Muhammad
//this file has three [3] examples ... each one has diffrent idea .. you must understand all examples .. to configurate your code ..

//get class file ..
include "ofile_class.php";


//start class
$ofile = new ofile;

#@@@@@@@@@@@@@@ 1st example @@@@@@@@@@@@@@@ [ simp split ]
echo "<br> Examle 1:<br> ";

$ofile->handle ( 'new.txt' );
$ofile->style ('<span style="color:red">','</span>');
//$ofile->write ( 'eeeeee', '<-line->' );
$ofile->read ( '<-line->', '<br />' );
$ofile->end ();




#@@@@@@@@@@@@@@ 2nd example @@@@@@@@@@@@@@@ [ complicated split ]
echo "<br> Examle 2:<br> ";
//2nd example
$ofile->handle ( 'www.txt' );
$ofile->style ('<span style="color:blue">','</span>');
//$ofile->write ( 'abdulrahman|we0ew@hotmail.com|saudi arabia', '<-line->' );
$ofile->read ( '<-line->', '<br />', '|' , '=-=-=-=');
$ofile->end ();



#@@@@@@@@@@@@@@ 3rd example @@@@@@@@@@@@@@@ [ complicated style ]
echo "<br> Examle 3:<br> ";
$ofile->handle ( 'www.txt' );
$ofile->style (
       
///first parameter
'<table style="width: 100%;border: 1px solid #000000;">
    <tr>
        <td style=" text-align: center;background-color: #C0C0C0;">hi .. ofile class examlpe
        <br />
        header</td>
    </tr>
    <tr>
        <td style=" text-align: center;background-color: #E9E9E9;">'
       
///second parameter
,'</td>
    </tr>
    <tr>
        <td style="text-align: center;background-color: #C0C0C0;">footer</td>
    </tr>
</table>'
);
$ofile->read ( '<-line->', '<br />', '|' , '=-=-=-=');
$ofile->end ();



?>