fopen wrappers with ftp upload

From: Date: Wed, 18 Aug 1999 18:11:15 +0000
Subject: fopen wrappers with ftp upload
Groups: php.dev 
Request: Send a blank email to php-dev+get-9992@lists.php.net to get a copy of this message
I was working on a script to upload a file via ftp and got: <b>Warning</b>: fopen("ftp://.../info.php","w") - File exists in <b>.//ftput</b> on line <b>5</b><br> So, I cruised through the source and found: /* when writing file, it must NOT exist */ if (result != 500 && result != 502 && (result <= 299 && result >= 200)) { php3_error(E_WARNING, "File already exists"); free_url(resource); SOCK_FCLOSE(*socketd); *socketd = 0; errno = EEXIST; return NULL; I am curious about why the file must not exist. I am sure there is a good reason. Brian.

« previous php.dev (#9992) next »