How PHP uses Plupload to get the uploaded file name in the background

Source: Internet
Author: User
Use plupload upload image, want to upload the image address to write to the database, ask how to get the file name of uploading pictures in the background. Thanks a lot!


Reply to discussion (solution)

Not used, but the contents of the uploaded file are in the $_files global variable
On the PHP receive page print this global variable look, Print_r ($_files)

The general filename has to be renamed according to a set of rules, otherwise it is easy to be overwritten by the duplicate name uploaded later.

Get the uploaded picture name using $_files[' upload control name ' [' name '] to get
For example


can use
$_files[' photo ' [' name '] to get

It is not recommended to use the uploaded file name, but to rename the file by date rules, so that the file with the same name can be overwritten by mistake.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.