English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories
0

//------------------------------------------------------------------------------
class ES_FileReader_CT1
//------------------------------------------------------------------------------
{
// for DB manipulation
var $ST;
var $kW;
var $hz;

function ReadFile()
{
$File = 'CT1.txt';
$FILE = fopen($File,"r");

while($buffer = fgets($FILE,1024))
{
$token = explode(' ',$buffer);
$this->ST = $token[0];
$this->kW = $token[1];
$this->hz = $token[2];


}

fclose($FILE);
}
}


function updateFile()
{

$File = 'CT1.txt';

$FILE = fopen($File,"w");

fclose($FILE);

}

there is something missing in update function but I can't figure it out..
In function ReadFile() i already displayed the data on html form..can someone help me with update function so the data can be updated...tq

2007-02-11 19:09:32 · 1 answers · asked by jia y 1 in Computers & Internet Programming & Design

1 answers

all "updatefile()" is doing is opening the file for write, then closing it again. you need to rewrite the data back to it, or append it, whatever your program requires.

2007-02-12 00:54:53 · answer #1 · answered by justme 7 · 0 0

fedest.com, questions and answers