XGenwareS
asked on
PHP Upload File Without Form
I need a php script that would be able to upload a file on a pc without a form like this:
ww.mysite.com/upload.php?f ile=C:\myf ile
is this possible?
ww.mysite.com/upload.php?f
is this possible?
ASKER
I don't want a form at all. I want just the script to be able to upload it, getting the file name from the url
Isn't going to happen. PHP running on the server does not have access to your computer.
the field you chose to read a file is of type 'file'. When submit that form which contains that file, complete info of file is passed to the page in action. on that page you read all file data using $_FILE.
All values in $_File are set when form is submited. There is no other way to red that.. You can make form submission apearently transparent but you cannot do this without using form.
regards,
aqif
All values in $_File are set when form is submited. There is no other way to red that.. You can make form submission apearently transparent but you cannot do this without using form.
regards,
aqif
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
well...
if what you tried to approach is ever possible then it would obviously be a serious major security hole.
if what you tried to approach is ever possible then it would obviously be a serious major security hole.
or use AJAX to send request to a file with these parameters attached. This way your page will not changes and you will remain on the same page.
regards,
aqif