2013-05-03 61 views
0

我想在另一個窗口中顯示文件路徑,但我不知道該怎麼做。請幫忙。謝謝!

在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; 
+1

'path'!='filepath' – 2013-05-03 02:33:48

回答

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

items.php正在尋找參數?path=但你導航用戶?filepath

+0

非常感謝你。 – user2335183 2013-05-03 02:38:15

+0

@ user2335183如果這解決了您的問題,您可以使用向上/向下投票中的綠色箭頭將其標記爲答案 – 2013-05-03 02:48:45

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

這是因爲在你的表格你:

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

,所以你需要使用$_GET['filepath']不是$_GET['file']