Re: ftp upload via web form - problem getting the file name correct

From: Date: Tue, 08 Mar 2005 16:25:18 +0000
Subject: Re: ftp upload via web form - problem getting the file name correct
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-210230@lists.php.net to get a copy of this message
Franklin van de Meent wrote: > Hello Steve, > > I tried this on my own servers and after replacing "<OUR FTP SERVER>" > with $ftp_server it works perfectly, all ASCII files get uploaded the > way they should with the correct filenames. > > Do you get any errors? (add error_reporting(E_ALL); above the login > vars to show them all) Hi I got a direct email reply yesterday which didn't show up on this list. Basically I needed to replace if (ftp_put($c, $ftp_server, $tmp_file, FTP_ASCII)){ with if (ftp_put($c, $_FILES['ftp_f']['name'], $tmp_file, FTP_ASCII)){ and it worked. The <OUR FTP SERVER> was just a suggested meaning for the url which is actually in there. Thanks for the help Steve

« previous php.general (#210230) next »