Problem with FTP and fopen
| From: | Chris Boget | Date: | Tue, 11 Feb 2003 15:10:28 +0000 |
| Subject: | Problem with FTP and fopen | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-135193@lists.php.net to get a copy of this message | ||
OK, I used the php ftp_put function successfully to upload a file. But
this is not what I need. I need to use the ftp_fput function to transfer
from a file pointer. This function failed to transfer the file with
Pureftp server but transfers successfully using Wu-ftp. Any ideas on why
Pureftp is failing to trasfer from a file point? I don't understand why
it would even know the difference. Possible a bug in PHP?
On Mon, 2003-02-10 at 13:30, Craig Jackson wrote:
> Anyone have any idea why this script cause a file to be created without
> the contents?
>
> <script language="php">
> set_time_limit(1200);
> $filename = "testthis";
> $fp =
> fopen("ftp://user:pass@server/outbound/devel/$filename",
> "w");
> $tran_info = sprintf( "%-10s\n","testthis");
> echo "$tran_info";
> fputs($fp, $tran_info );
> fclose($fp);
> </script>
>
> Using the latest version of pure-ftpd from source on Linux.
> --
>
> Craig Jackson
> __________________________
> Wildnet Group LLC
> 103 North Park, Suite 110
> Covington, Lousiana 70433
> Office 985-875-9453
> __________________________
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: list-unsubscribe@pureftpd.org
> For additional commands, e-mail: list-help@pureftpd.org
--
Craig Jackson
__________________________
Wildnet Group LLC
103 North Park, Suite 110
Covington, Lousiana 70433
Office 985-875-9453
__________________________