Uploading Files in php

K

kiran

hi,
i have path of the file to uploaded for eg: c:\program
files\xyz\xyz.txt so can i directly upload the file to server without
using filetype and submit button. if i can kindly let me know how to
dao that.
 
E

Erwin Moller

kiran said:
hi,
i have path of the file to uploaded for eg: c:\program
files\xyz\xyz.txt so can i directly upload the file to server without
using filetype and submit button. if i can kindly let me know how to
dao that.

Hi Kiran,

Like any file of your choice?
Luckily you cannot.
If you could do that in a browser, it is broken.
The security implications are obvious...

Regards,
Erwin Moller
 
D

David Dorward

kiran said:
i have path of the file to uploaded for eg: c:\program
files\xyz\xyz.txt so can i directly upload the file to server without
using filetype and submit button. if i can kindly let me know how to
dao that.

In the standard security environment - you can't. (Thankfully - otherwise it
would be a trivial matter to upload "my passwords file" or "the file where
a common accounting application stores credit card details" or whatever.

The normal way to upload a file is to use a file input and have the user
select the file themselves.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,835
Latest member
lila30

Latest Threads

Top