Upload all files/directories found in start directory on local server to remote server using FTP.
Write a php class that will work as a simple FTP client for uploading files only.
You will be given these variables:
- local server path (where all the files and directories for uploading reside)
- remote server FTP username
- remote server FTP password
- remote server FTP address
- remote server path
The class will work this way:
It will be run from local server. It will upload all the files/directories within local server path to remote server path. Make sure binary files stay binary and text files stay text.
It will set permission of any uploaded file ending with .txt to 666.
If permissions for other uploaded files need to be set while uploading (in case that is required by php) they need to be set to default - whatever a normal FTP setup would use - therefore I believe standard files to 644 and directories to 755. If no permissions need to be set at upload just leave it up to the FTP software on the remote server to take care of it.
If same files already exist on the remote server, overwrite them.