"be consistent" | |
PerlMonks |
Re: Cgi pm and photo uploadsby chanio (Priest) |
on Oct 04, 2003 at 20:41 UTC ( [id://296580]=note: print w/replies, xml ) | Need Help?? |
Sorry if I haven't understood you well. Let me explain you the concept of what I think that you have said: to upload something from any PC to a server there is a lot of magic! Basicaly, you need someone asking for a file from the server. And another one, pushing a file from the user's PC. To do this, you need more than an HTML form. That is just speaking. But you must also do something to make it happen. That is where perl comes as an agent from the server part. You don't need to have perl in the users part. Just the HTML form would do that part by fetching the file. After submiting the form, you need perl to handle the data being transfered. It has to read that data and write the file's content to the directory that you chose. So your form called the perl script that you wrote and left at the server's /cgi-bin/ directory. That script read all the ulpoaded file and wrote it bit by bit on the directory that you chose. Now you need to finish the script and show the image in some new html page. To get your script be more than words written in a file, you need to have perl installed at the same location that you declared at the first line of your cgi script. You could know that it is correct if you see that perl is in the folder /usr/bin/ . If not, you could change that starting text with the name of the directory where Perl resides... At the command promp you should write:where perl And what you read as an answer is what you should copy at line 1 You should read a complete book and try some examples until you get all the idea: http://sunsite.iisc.ernet.in/virlib/perl/example/ewtoc.html .
In Section
Seekers of Perl Wisdom
|
|