Home > Web Front-end > HTML Tutorial > How to browse and obtain the local file path_html/css_WEB-ITnose

How to browse and obtain the local file path_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:25:40
Original
2309 people have browsed it

I defined a style myself: ""
The main body code is:
fprintf(cgiOut, "

");
fprintf(cgiOut, "");
fprintf(cgiOut, " ");
fprintf(cgiOut, "
");
fprintf(cgiOut, "
");
fprintf(cgiOut, "");
The effect you want to achieve is: an input text box in the front, a browse button in the back, and the content in the text box displays the selected local The path of the file, but the path displayed after the above code is implemented is: c:fakepath file name. The file name is correct, but the path is wrong.

Please give me a solution, especially in a hurry! ! ! ! ! ! ! ! Thank you in advance


Reply to the discussion (solution)

Browser security mechanism does not allow scripts to read local paths
There is no solution, you can try to upload it with falsh Can I get the local path?

Is there any way to remove the obtained c:fakepath? I just need the file name, is that okay?

Is there any way to remove the obtained c:fakepath? Well, just the file name, is that okay?
Just parse the string

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template