我有以下带有<td>
标记的<a>
标记,其中包含href中的php变量。我只能浏览上传文件夹。有谁知道为什么?它应该浏览到uploads\$_POST['searchInput']
。但事实并非如此。
<td class="viewEditTd"><button class = "btn btn-info viewEditButton"><a href="file://///172.xx.xx.xxx\TEMP\xxx\uploads\"<?php echo $_POST['searchInput']; ?>"\" target="_blank"><span class="
glyphicon glyphicon-folder-open" aria-hidden="true"></span> View File</a></button></td>
&#13;
答案 0 :(得分:0)
我可以在Stack overflow论坛成员的帮助下解决这个问题。这是它如何解决的。我的问题如下:
if(isset($_GET['u']) && !empty($_GET['u'])){
$url = base64_decode($_GET['u']);
$browser = Browser::detect();
if($browser == 'webkit'){
echo '<html><head><title>Redirecting...</title><meta http-equiv="refresh" content="15.5; URL="'.$url.'"></head></html>';
exit();
}
}
通过删除<td class="viewEditTd"><button class = "btn btn-info viewEditButton"><a href="file://///172.xx.xx.xxx\TEMP\xxx\uploads\"<?php echo $_POST['searchInput']; ?>"\" target="_blank"><span class="
glyphicon glyphicon-folder-open" aria-hidden="true"></span> View File</a></button></td>
标记周围的两个双引号解决了问题。工作答案是
php