Skip navigation

I had some success today finishing up a small project I had been wanting to work on whenever I had time.  I wanted to be able to transfer uploaded artwork from our website directly to a file server via FTP.  We have been using built-in PHP functions to create and move the uploaded files into folders, but it was residing on our webserver.  I wanted to connect to a file server so that our site gets a little more portable (I could run the site elsewhere and the files should show up here) and to reduce the number of people who need access to the webserver itself.  Here’s what I came up with:

//FTP connection
$conn = ftp_connect(“serverAddress”) or die(“Could not connect”);
//make directory
//change directory to newly created one
//put temp PHP files in new folder

Seems simple enough, I just had doubts to if the FTP functions could extract the $FILES information. 


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: