search

Home  >  Q&A  >  body text

PHP implements file uploading to a specified folder, and the file path or name is stored in the database. How to achieve this?

php uploads files to a specified folder and stores the file path or name in the database. How to achieve this?


2259 days ago1199

reply all(2)I'll reply

  • 神沐

    神沐2018-09-26 17:55:22

    If the database does not have a table, create a table, and then add an operation to add the file path or name to the database when uploading, and then just like this

    1537955682(1).jpg

    reply
    0
  • Is there any actual case? I will build a file transfer management system.

    · 2018-09-26 18:04:49
    神沐

    You can write a simple one yourself, which only has the file upload function, and then the database only stores one path. It is also very fast to write a test locally.

    神沐 · 2018-09-26 18:08:23
  • Cancelreply