[英]<input type=“file” name=“img” accept=“.jpg”> is retriving only image name insted of full path, how to fix it?
<input type=file name=img accept=".jpg">
is retrieving only image name instead of full path, how to fix it? <input type=file name=img accept=".jpg">
仅检索图像名称而不是完整路径,如何解决?
for example: if image URL is c:\\images\\img.jpg
, It taking only img.jpg
, instead of full path . 例如:如果图像URL为
c:\\images\\img.jpg
,则仅使用img.jpg
而不是完整路径 。 it works fine in older version of browsers like iexplorer.. But not working in Chrome and Firefox. 它在iexplorer等较旧版本的浏览器中可以正常工作。但是在Chrome和Firefox中则无法使用。
尝试这个:
$filePath = realpath($_FILES["file"]["tmp_name"]);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.