您的位置:首页 > 其它

函数的调用

2011-11-08 19:48 92 查看
<?php
require("one.php");
function more_args(){
$args=func_get_args();
for($i=0;$i<count($args);$i++){
echo"第".$i."个参数是:".$args[$i]."<br>";
}
}
more_args("one","two","three",1,2,3);
include("two.php");
function more(){
for($i=0;$i<func_num_args();$i++){
echo"第".$i."个参数是:".func_get_arg($i)."<br>";
}
}
more("one","two","three",1,2,3);

function test($n){
echo $n."  ";
if($n>0)
test($n-1);
else
echo"<---->";
echo$n."  ";
}
test(10);
?>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: