没有传参数过来 但在调用函数时,函数中的print("file=".$file.";title=".$title.";rank=".$rank.";user=".$user.";page=".$page.";totalpage=".$totalpage)能将所有参数都正确打印出来啊 -------------------------------It may be caused by the variable $totalpage is a global variable , so it has value in the function , but the 6th argument of the function has no value . You should add it when you use the function:view('a','a',1,'test',1,4);
function view($file,$title,$rank,$user,$page,$totalpage)----------------------------Notice:the $totalpage here is not the global variable $totalpage.
能打印出所有参数值啊
$totalpage//看你的意思是做个翻页的函数,
你这个值是不是设置为全局变量(global),如果是的话,请检查下你的WINXP下的PHP.INI,文件的
registe_global = On//设置为打开状态
{
$numargs = func_num_args();//添一个这函数,看下你传过来几个参数
echo "Number of arguments: $numargs\n";
} foo(1, 2, 3); // Prints 'Number of arguments: 3'
没有传参数过来
但在调用函数时,函数中的print("file=".$file.";title=".$title.";rank=".$rank.";user=".$user.";page=".$page.";totalpage=".$totalpage)能将所有参数都正确打印出来啊
但在调用函数时,函数中的print("file=".$file.";title=".$title.";rank=".$rank.";user=".$user.";page=".$page.";totalpage=".$totalpage)能将所有参数都正确打印出来啊
-------------------------------It may be caused by the variable $totalpage is a global variable , so it has value in the function , but the 6th argument of the function has no value .
You should add it when you use the function:view('a','a',1,'test',1,4);