PHP的参数传递问题,希望高手能够解答。
index.php文件:
<?php
require_once ("main.php");
?>
main.php文件:
$mimi=new main;
class main
{
function main()
{ global $act;
switch($act)
{case "showclass":
$this->showclass();
break;
default:
$this->showindex();
}
}
}
index.php和main.php只写出了重要部分的代码,以便浏览。
但我进入首页后可以正常显示,但是当点击首页上的index.php?act=showclass时,应该显示act=class时的页面,为什么还是显示首页,而不是showclass()应显示的页面啊,是$act=class没有传递成功吗?我用的是win2003的iis。但是当我在windowsxp+apache时却没有这个问题,能够正常显示。求高手解答啊。