Adding data to file via FTP

From: Date: Fri, 01 Dec 2000 17:37:14 +0000
Subject: Adding data to file via FTP
Groups: php.general 
Request: Send a blank email to php-general+get-28232@lists.php.net to get a copy of this message
Hi there, I tried to open a file via FTP for adding some data to the end of the file. The connect has been opened with fopen() -function. Here is the code strip: $f = fopen ("ftp://user:pass@ftp.pilotmedia.fi/$ftpdir/carts/$sesid.dat", "a+"); fputs ($f, time()."//".$prod."//".$amnt."//\n"); fclose($f); Why this doesn't work? PHP causes an error "Warning: fopen("ftp://...@ftp.pilotmedia.fi//shopdata/carts/b72986b7ab9fc3a707c7704bc1c5addd.dat","a+") - File exists in /home/cust/n/e/nettipaa/www/psite/webshop/addtocart.php3 on line 27" Is there any way to open the file and write some data to the end of the file via FTP? Thanks, - Ville

« previous php.general (#28232) next »