in reply to Re^4: Upload file (PDB format ) on server
in thread Upload file (PDB format ) on server
Your form tag should look something like this:
<form enctype="multipart/form-data" action="results.pl" method="post">
That's probably not your only problem - but you'll need the enctype stuff to upload a file properly.
Also - you seem a little unclear about how CGI works. A CGI script runs on the SERVER. Your browser runs on the CLIENT. If you're running your own web server, "localhost", then client and server are the same - but that's normally not the case. The scripts don't run as you (i.e., not as your user id), but instead as the web server's user id (usually 'nobody' or 'www-user'). In general, a script running on the server has no way to see files on your local (client) file system, and even if it could, it would not have permission to do anything to them (giving the web server user the ability to do so is a huge security risk - don't do it!).
The way to do it correctly is upload the file (from client to server). The server will need a directory that it has permission to write into, so it can save the upload. Then you can process it however you like.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Upload file (PDB format ) on server
by flyPerl (Initiate) on May 29, 2009 at 04:56 UTC |