时间:2021-07-01 10:21:17 帮助过:42人阅读
<scriptlanguage="php"> //嵌入方式一 echo("test"); </script> <? //嵌入方式二 echo"<br>test2"; ?> <?php //嵌入方式三 echo"<br>test3"; ?> |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
<? $a=1; functiontest(){ echo$a; } test();//这里将不能输出结果“1”。 functiontest2(){ global$a; echo$a; } test2();//这样可以输出结果“1”。 ?> |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
<? $a[0]="abc"; $a[1]="def"; $b["foo"]=13; $a[]="hello";//$a[2]="hello" $a[]="world";//$a[3]="world" $name[]="jill";//$name[0]="jill" $name[]="jack";//$name[1]="jack" ?> |
![]() ![]() ![]() ![]() 人气教程排行
|