php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1183 File write Access
Submitted: 1999-02-25 04:40 UTC Modified: 1999-02-25 04:55 UTC
From: Rene dot Matthaeus at comware dot de Assigned:
Status: Closed Package: Parser error
PHP Version: 3.0.6 OS: SuSE Linux 6.0 Kernel 2.0.36
Private report: No CVE-ID: None
 [1999-02-25 04:40 UTC] Rene dot Matthaeus at comware dot de
When I create/open a File to write, only could be written in the File when there is one Byte in the File.

Can you Help me ?


while ($row = mysql_fetch_row($result)) {

   $fname="export.dat";

        if ($fp = fopen($fname, "a+")) {
             for ($i=0;$i<=13;$i++) {
             $data[$i]=("$row[$i],");
             fputs($fp,$data[$i]);
          
             }
             fclose($fp);
             }
}

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-02-25 04:55 UTC] eschmid
On what line? Is it the extra koma in 
$data[$i]=("$row[$i],");

why don't you write it
$data[$i] = $row[$i];

or fputs ($fp, $row[$i]);

-Egon
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 13:01:31 2024 UTC