Dear Friends,
I would like to know if there is a way to upload a file to a particular online folder, repeating the process until all files are uploaded. One file will go to one folder, another file to another folder. The file has in its name the name of the folder. For instance, the file that should go into the JonesJ online folder may be named January2008-JonesJ.txt
One last item .. the online folders have been created using PHP and are username/password protected. I have all of the this info so if some database has to be queried to get this info before each upload can take place I can do it.
Thanks,
Mike
Uploading a file to a particular online folder-repeat
Moderator: General Moderators
-
mjwillyone
- Forum Newbie
- Posts: 1
- Joined: Fri Mar 27, 2009 2:09 pm
Re: Uploading a file to a particular online folder-repeat
What type of online folder are you referring to? You can use the FTP module to upload files via ftp through PHP. Information about this can be found here:
http://us2.php.net/manual/en/book.ftp.php
If the folders you are referring to are just regular folders on the server running php, then a standard upload script will work. Some examples can be found here:
http://us2.php.net/manual/en/features.f ... method.php
You will need to make sure file_uploads=y is enabled in your php.ini. There are a number of other things you will need set, but they're all detailed in the above link. You'll just need to modify the code to dynamically choose which folder is appropriate.
Joe Ceresini
Network Engineer
jceresini@hostmysite.com
HostMySite.com
http://us2.php.net/manual/en/book.ftp.php
If the folders you are referring to are just regular folders on the server running php, then a standard upload script will work. Some examples can be found here:
http://us2.php.net/manual/en/features.f ... method.php
You will need to make sure file_uploads=y is enabled in your php.ini. There are a number of other things you will need set, but they're all detailed in the above link. You'll just need to modify the code to dynamically choose which folder is appropriate.
Joe Ceresini
Network Engineer
jceresini@hostmysite.com
HostMySite.com