Issues with uploading images and thumbnails into the database
拼搏奋斗
拼搏奋斗 2019-12-08 12:09:57
0
3
1334

QQ图片20191208093407.png


QQ图片20191208093615.pngThere are check boxes in the html form, and some fields have default values, so is it impossible to specify the fields one by one to upload data?

拼搏奋斗
拼搏奋斗

reply all (2)
拼搏奋斗

The problem has been perfectly solved. Convert the file object returned by the controller into an array and assign the specified field to the form $data. I have been troubled for many days and solved it in an instant, haha!

    青草根

    Isn’t this under your own control? How did you encapsulate it? Just specify the fields when encapsulating

    • reply There is no problem with encapsulation. Image upload and thumbnail creation are successful. There is no problem with field specification. However, the two fields returned become an array. When added to the form data, it becomes a nested array. All other data are Okay, I just don’t know how to handle these two image paths before they can be saved into the database?
      拼搏奋斗 author 2019-12-08 13:45:40
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!