/**************by garcon1986*************/ extract 用法: <?php /* Supposons que $var_array est un tableau retourné par wddx_deserialize */ $size = "large"; $var_array = array("color" => "blue", "size" => "medium", "shape" => "sphere"); extract($var_array, EXTR_PREFIX_SAME, "wddx"); echo "$color, $size, $shape, $wddx_size/n"; ?> <form action="action.php" method="post"> <input type="text" name="username"> <input type="password" name="password"> <input type="submit"> </form> action.php <?php extract($_POST); //相当于$username = $_POST['username']; //$password = $_POST['password']; ?> addslashes用法 <?php $str = "Votre nom est-il O'reilly ?"; // Affiche : Votre nom est-il O/'reilly ? echo addslashes($str); ?>