How does php obtain the absolute path of the file to be uploaded under the form?

Source: Internet
Author: User
Php: how to obtain the absolute path image of the form Upload File: how to obtain the address containing the absolute path, for example, D: phpEssampwwwroothuaxiaImg1 php: how to obtain the absolute path of the form Upload file
Image:

$ Src = $ _ POST ['src'];
Get 1.jpg
How to obtain an address containing an absolute path, such as: D: \ php \ Essamp \ wwwroot \ huaxia \ Img \ 1.jpg


------ Solution --------------------
When the file changes (onchange time record), the src value is assigned to the hidden domain, and the server can obtain the hidden domain.
------ Solution --------------------
1. this is meaningless. displaying the user's local path will lead to resentment.
2. if you have to do this, you can assign the string in the input box to the hidden variable on the page so that you can post the variable.
Let me give you a reference. you can assign the hidden variable to js.

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.