Jonathan said:
Neither had I, but I had seen folks with Hotmail and Yahoo accounts and
the webmail , essentially a form in a browser, seem to use the
input=’file’ to browse for attachments and would build a list on the
page similar to what I was describing. Just speculating, but that was
how I thought they did it.
No way. I've seen lots of browser based applications. There are generally two
methods submitting files to the server:
First one is by using the HTML-File-Input-Field. There's only one possibility
uploading files with this: The user has to browser for each single file and
submit the form.
The second one is using something like a java applet doing the upload. If the
user allows the applet to browse the local disc and submit data (there's allways
a security warning from Java-Sandbox when trying this), you can upload mutliple
files or a folders content by this applet (have a look for JUpload on
sourceforge ie).
But because of security restrictions in browsers, there's no way in setting the
file by JS or predefining the file on the server (like allready multiple times
mentioned).
Never used function, just learning PHP, but there are a slew of PHP
functions for FTP. Onced logged on the server, did not think the fopen()
command that reads the local file had to get the filename from a form's
input=’file’. You can hand type source, or hardcode in script to then be
uploaded via ftp_fput(), right?
Even if you're having the filename an dpath on teh server, really getting the
file from the client by using file something like FTP requires three things:
First, the client must have a connectable FTP-Server running. Second: You're in
need of an account to connect to the FTP-Server on the client. And the third
thing: you have to find the right file (FTP-Path != absolute Filepath).
So in very few cases, you could transfer data to the server this way. But in
allmost all cases, this won't working.
martin