简体   繁体   中英

PHP File upload redirect

Ok, this is might sound like a security hole but let's ignore that for a while. I need to allow users to upload a file to my website but I want to be in control of generating that file. I have a form where I want the user to create the new file and then that file should be the one that is uploaded. Is there anyway I can subvert the file upload control so that instead of popping up the 'Open' dialog box, it pops up my form and then when the form is submitted, the new created file is the one that's uploaded with the control?

Alternatively, I figure I could just use a regular button and a bit of JavaScript to open up my form in a window but then I would need a way to automatically the file to the form to be uploaded when my external form closes.

Thanks for the help!

如果要控制生成该文件,为什么不让表单提交生成控件所需的所有信息,然后在服务器上生成文件?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM