php
2013-05-03 9 views 0 likes 
0

경로에 여러 urlencode 싶습니다. 나는 그것을하는 방법을 모른다. 나는 PHP에서 아주 새롭다. 그래서 도와주세요. 고맙습니다. search_form.phpPHP - 여러 참조/urlencode에 대한 올바른 구문

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

"복수"urlencode로 무엇을 의미합니까? –

+0

this. items = 'urlencode ($ type)' "" – user2335183

+0

정확히 무엇이 문제입니까? 오류가 표시됩니까? ? –

답변

4

잊어 버려 urlencode.

$url = 'items.php?'.http_build_query(array('filepath'=>$path, 'name'=>$name, 'type'=>$type)) 

이 각 inbetween &을 추가 할 것입니다, 그것은 깨끗하고 간단 : 그것은이처럼 할 쉽다.

-1

당신은 ($name$type 후) 장소의 몇 연결 연산자, .을 누락하고 있으며, 올바르게 URL에 다른 매개 변수를 결합하지 않는에서

:

echo '<a href="items.php?filepath='.urlencode($path).'&name='.urlencode($name).'&type='.urlencode($type).'" 
onClick="MM_openBrWindow(\'items.php?filepath='.urlencode($path). '\',\'google\',\'width=650,height=500\'); return false;"> 
<img src="Folder-Blank-icon.png"> 
</a>'; 
관련 문제