【发布时间】:2012-12-07 08:52:33
【问题描述】:
我在我的电脑上使用 wampserver 并写了一个简单的 html-form:
<form name="test" action="upload_file.php" method="post">
<label for="file">Filename:</label>
<input type="file" name="picurl" id="file" ><br>
<input type="submit" name="submit" value="Submit" >
</form>
当我点击“浏览”并打开一个文件时,例如 pil.png 它会在输入文本区域中显示完整路径(C:\Users\hope\Desktop\images\pil.png) 我希望保存这个确切的链接,但是当我尝试捕获它时 $name = $_POST["name"]; 它只显示 this-"pil.png" 而不是完整路径。为什么?
【问题讨论】:
-
你会从服务器上的完整路径开始做什么?
-
好吧,好问题,我只是想在我的计算机中安排我在练习 html css php 等时需要的所有图像......
-
谢谢大家,我想我会尝试不同的方法。
标签: php html wampserver