有人是目前這個頁面上,並希望從LANG = EN語言更改爲LANG = FR:
http:://domain.com/index.php?p=1&b=1&c=3&d=4&lang=en // I put two colons to disable the link here
我怎樣才能保持價值的其餘部分,只是改變了郎=恩?
備註B = 1 & C = 3 & d = 4是有條件的並且可能不存在(例如,它可以是僅B = 1架& F = 5有時等)
我可以去儘可能:
<a href="index.php?p=<?php echo $p; ?>&lang=fr">Change to French</a>
我必須去通過所有可能的參數,如:
<?php
IF (ISSET($_REQUEST['b'])) { $b = '&b=' . ($_REQUEST['b']) } else { $b = ''; }
IF (ISSET($_REQUEST['c'])) { $c = '&c=' . ($_REQUEST['c']) } else { $c = ''; }
IF (ISSET($_REQUEST['d'])) { $d = '&d=' . ($_REQUEST['d']) } else { $d = ''; }
?>
<a href="index.php?p=<?php echo $p . $b . $c . $d; ?>&lang=fr">Change to French</a>
感謝教導!
是的,你需要去的所有參數。 –