$GET,PHP-错误:未定义的索引:路径


$GET, PHP - Error: Undefined index: path

我想在另一个窗口中显示文件路径,但我不知道该怎么办。请帮忙。非常感谢。

在search_form.php 中

<td><a href="items.php?filepath=' .urlencode($path). '"onClick="MM_openBrWindow(''items.php?filepath=' .urlencode($path). ''',''window'',''width=650,height=500''); return false;"> <img src="Folder-Blank-icon.png"> </a></td>

在items.php 中

$filepath = mysql_real_escape_string($_GET['path']);
echo $filepath; 
$filepath = mysql_real_escape_string($_GET['filepath']);

您的items.php正在查找参数?path=,但您正在将用户导航到?filepath

$filepath = mysql_real_escape_string($_GET['filepath']);
echo $filepath; 

这是因为在你的表格中你有:

<a href="items.php?filepath=...

所以您需要使用$_GET['filepath']而不是$_GET['file']