search

Home  >  Q&A  >  body text

javascript - A problem when uploading files

< /p>

<form id="form1" method="POST" action="http://XXXXXX/file/upload/" enctype="multipart/form-data">

    <p>
        <input id="File1" type="file" name="files"/>
        <input type="submit">Submit</input>
    </p>
</form>

This is a code for uploading files
1: Single click execution such as
file:///Applications/XAMPP/xamppfiles/htdocs/vscodtest/flex.html
It is possible to upload

2: It can also be executed on locahost such as "http://localhost/vscodtest/fl..."

The problem is:

It won’t work if I copy this code into our project thinkPHP
Is there anything special configuration required?

我想大声告诉你我想大声告诉你2808 days ago438

reply all(1)I'll reply

  • 高洛峰

    高洛峰2017-05-16 13:06:44

    It’s a cross-domain issue

    Please refer to the
    X-Frame-Options response header

    reply
    0
  • Cancelreply