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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: Rene dot Matthaeus at comware dot de
New email:
PHP Version: OS:

 

 [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

Add a Patch

Pull Requests

Add a Pull Request

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: Tue Apr 30 04:01:30 2024 UTC