2007年11月15日 星期四

PHP中避免用網址傳BIG5中文值時產生亂碼的方法

用urlencode()。

example:

<?php
echo '<a href="mycgi?foo=', urlencode($userinput), '">';
?>

來源網站:
PHP: urlencode - Manual
http://tw2.php.net/manual/tw/function.urlencode.php

沒有留言: