[英]strange characters in URL while displaying in PHP
I am using PHP to display a fileserver path. 我正在使用PHP显示文件服务器路径。
What I am getting now: 我现在得到的是:
file:%22////filsrv//logs//Test//D_log1.1.1%22
I am using this method to strip 我正在使用这种方法剥离
$rs1 = preg_replace("/%u([0-9a-f]{3,4})/i","",urldecode($row['ResultDirectory']));
but I am not sure If I am using the right one, 但是我不确定如果我使用的是正确的,
The actual Path stored in the DB is : 存储在数据库中的实际路径为:
\\filsrv\logs\Test\D_log1.1.1
missing anything? 缺少什么? Thanks, 谢谢,
Ok, resolved with this 好,解决了
echo '<a href=file:'.$rs1.'</>';
to 至
echo '<a href='.$rs1.'</>';
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.