<?php header("Content-Type:text/html;charset=gb2312"); function test1(&$a){ $a.="和小明"; } $b="这是小王"; test1($b); echo $b;//这是小王和小明 echo "<hr>"; function test2($a){ $a.="和小明"; } $c="这是小王"; test2($c); echo $c;//这是小王 ?>
<?php header("Content-Type:text/html;charset=gb2312"); function test1(&$a){ $a.="和小明"; } $b="这是小王"; test1($b); echo $b;//这是小王和小明 echo "<hr>"; function test2($a){ $a.="和小明"; } $c="这是小王"; test2($c); echo $c;//这是小王 ?>
转载于:https://www.cnblogs.com/h-g-f-s123/p/5828771.html