如何不让smarty对url中的“&”转成“&”?
后台:
<br />function save_sort_handler(){<br /> //-----获取应该返回的地址-----//<br /> $backUrl=R('backUrl','');<br /> if(empty($backUrl) && isset($_SERVER["HTTP_REFERER"])){<br /> $backUrl=$_SERVER["HTTP_REFERER"];<br /> }<br /> $GLOBALS['smarty']->assign("backUrl",$backUrl);<br /> //----------------------//<br /> $GLOBALS['smarty']->display("takeaway_sort.dwt");<br />}<br />
<br /><script type="text/javascript"><br /> alert('{$backUrl}');<br /> var isComplete={$isComplete};<br /> <br /> if(isComplete){<br /> var result="保存成功!";<br /> }<br /> else{<br /> var result="保存失败!";<br /> }<br /> if(confirm(result+" 是否返回?")){<br /> location.href='{$backUrl}';<br /> }<br /> else{<br /> var type='{$type}';<br /> if(type!=''){<br /> location.href="takeaway_sort.php?type={$type}&backUrl={$backUrl}";<br /> }<br /> }<br /> </script><br />