uploading direct from local hard disc

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
vagabundo
Forum Newbie
Posts: 1
Joined: Sat Apr 12, 2003 11:03 am

uploading direct from local hard disc

Post by vagabundo »

Is there a way to upload a file directly from my hard disc other than using a 'file' field in a form? In other words can I set the path/filename in a script rather than having to run a form and browse for the file?

I need to upload a batch of files ( file1.txt, file2.txt, file3.txt, etc.
...) from a specific directory and it would be handy to use a loop within a
PHP script to set the path of each as a variable (say) and upload it, rather
than browse through the disc for each one and click submit.

I'm sure this must have come up before but I don't know where to look for
the solution!
[]InTeR[]
Forum Regular
Posts: 416
Joined: Thu Apr 24, 2003 6:51 am
Location: The Netherlands

Post by []InTeR[] »

THe php script must hava access to your 'update' file.

This is easy if the php script runs local. If the script is runnening on a remote server is somewhat more complex.

What i did is i made a 'task' on my win98, that uses the dus ftp command to upload a dir to the internet.

The upload duration was about 1h, so 1h30 later i run a cronjob at the server that read's this file.
airo
Forum Commoner
Posts: 31
Joined: Thu Apr 24, 2003 4:07 pm

Post by airo »

I think theres some code on evilwalrus that does something similar to what your askingfor...
Post Reply