You are here: Re: [PHP] ftp upload via web form - problem getting the file name correct « PHP « IT news, forums, messages
Re: [PHP] ftp upload via web form - problem getting the file name correct

Posted by Steve Turnbull on 03/08/05 18:25

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация