Forum Moderators: coopster

Message Too Old, No Replies

How can I FTP files using PHP?

PHP FTP functions are first upload by HTTP?

         

Parlays

9:55 pm on Jan 15, 2008 (gmt 0)

10+ Year Member



PHP has FTP functions but whenever I use an HTML form to submit to the PHP page making the FTP upload, isn't the file always first uploaded to the temp directory on the server through HTTP and then FTP is used to move it to the new location on the server?

How can I upload a file using FTP instead of HTTP? Doesn't the form have to submit to a page that is FTP:// so that it goes by FTP? Please help, because all PHP handling scripts are on HTTP://

PHP_Chimp

10:38 pm on Jan 15, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can use ftp://ftp.example.com in the form action if that is what you want, then you get ftp.
Do you have an anonymous log in on the ftp server? As you dont want to have to put your password in plain text for everyone to see.