PHP $a = 123;Global $a; //在函数体外把$a定义为global变量。 function aa() {echo $a;}aa(); //会报错,不能输出变量a。? >
来源: http://www.bubuko.com/infodetail-1868622.html