note 73078 rejected from function.fwrite by nlopess

From: Date: Thu, 08 Feb 2007 12:34:23 +0000
Subject: note 73078 rejected from function.fwrite by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-123112@lists.php.net to get a copy of this message
Note Submitter: madriang at yahoo dot com ---- hy. how can i make that every line to include a number front ? <?php $filename = 'data.txt'; $zi_nastere = $_POST['zi']; $luna_nastere = $_POST['luna']; $an_nastere = $_POST['an']; $mesaj = $_POST["text"]; $mesaju = str_replace("\r", '<br />', $mesaj); $date = date('d').'.'.date('m').'.'.date('Y'); $data = "$zi.$luna.$an"; $header = '<div class="message"><span class="data">'; $header2 = '</span><br /><span class="style26"><strong>&nbsp;&nbsp;&nbsp;&curren; </strong></span>'; $header3 = '</span></div>'; $somecontent = "$header$data$header2$mesaju$header3<br>"; if (is_writable($filename)) { if (!$handle = fopen($filename, 'a')) { echo "Cannot open file ($filename)"; exit; } if (fwrite($handle, $somecontent) === FALSE) { echo "Cannot write to file ($filename)"; exit; } ok(); fclose($handle); } else { echo "The file $filename is not writable"; } ?> i tri something like $i=($i+1); but doesn`t work. somebody have some ideas, pls ?

« previous php.notes (#123112) next »