Click to See Complete Forum and Search --> : where does this script send files


dvdljns
11-06-2003, 09:59 PM
ok! I have got this script that is suposed to allow peaple to upload files but do not know how to point it to a folder of my choice. If I cannot get it to go to a folder in my website it is no good. So can somebody explain in idiot terms how this works

AdamGundry
11-07-2003, 02:11 AM
This script does not allow you to upload files, only to validate files for upload. You will need a server-side script (in a language such as PHP or ASP) to do this.

Adam

dvdljns
11-07-2003, 03:24 AM
And once I upload it and set it up on my website isn't it serverside.

AdamGundry
11-07-2003, 03:48 AM
No, the difference is where the code is executed, not where it is stored. Client-side javascript runs in the browser (and hence cannot handle file uploads), whereas server-side languages run on the web server, so they can accept uploads and store them. Basically, if you can see the code in your browser (or in an external JS file) it is client-side, if you cannot it is server-side.

There is a reference to a server-side program in that script, /cgi-bin/some-script.cgi, which is simply a placeholder for the actual script name. You will need a suitable server-side script to do this, and for any level of security you will need to validate the file on the server as well.

Conclusion: the JS you posted is useless. Get a server-side script.

Adam

dvdljns
11-08-2003, 01:38 PM
OK! THANKS. I downloaded apache mysql and php. I will setup apache so I can use it localy. I don't know if apache is what I want on windows but I hate the way IIS handles permissions and I hear apache does a better job. I geuss I need something to check scripts on. I have been trying to check scripts by loading them on a couple free hosting service.
but that don't really work. I am going to set everything up here and than I can compare whats going on on both ends. also It will allow me to set up my webpage completly and trouble shoot it before I upload it.