Home  >  Q&A  >  body text

php - When uploading files asynchronously, why is tp5 $request->file(); unable to get the value?

1. When I use fileinput for asynchronous upload, I submit it to the background through routing.

2.Routing

3.Background reception

4. Problem
Return [1,{}]
Cannot get the value
5.1 Supplement
If you use $_FILES['cover']; here, you can get the value
5.2 Supplement
If the form is submitted, the value can be obtained
6. Please clarify the confusion! Grateful!

phpcn_u1582phpcn_u15822685 days ago1196

reply all(1)I'll reply

  • 阿神

    阿神2017-07-04 13:48:16

    $_FILES contains a value, that means there is a problem with the file method of tp.
    Look at the source code of the file method and trace it.

    reply
    0
  • Cancelreply