From:             [EMAIL PROTECTED]
Operating system: linux
PHP version:      4.0.5
PHP Bug Type:     *Directory/Filesystem functions
Bug description:  problem with fopen over ftp and a related fgets

Configure      './configure'      
'--with-apxs=/usr/local/apache/bin/apxs'
Command        '--with-mysql'  '--with-pgsql'  '--with-zlib'
'--enable-ftp'
               '--with-gd'                
'--with-jpeg-dir=/usr/local/lib'
               '--enable-versioning'             
'--enable-track-vars=yes'
               '--enable-url-includes'                  
'--enable-sysvshm'
               '--enable-syscsem' '--with-gettext'

<?php
        $file = "user:[EMAIL PROTECTED]/path/file.txt";

        if (!($fp = fopen($file, "r+"))) {
                echo "error: can't open file<br>";
                exit;
        }

        fputs($fp, "test number one...");
        fputs($fp, "test number two...");
        fputs($fp, "etc...");

        fclose($fp);
?>
-------------------------------
The problem is, that nothing is written in the file even though fopen,fputs
and
fclose do not return an error.

If you use fopen($file, "a+") the strings are written to file. But now
the problem is, that fopen tries to create that file even if it already
exists.

Ciao,
Tobias

-- 
Edit bug report at: http://bugs.php.net/?id=12004&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to