PHP的参数传递问题,希望高手能够解答。

Lancelot_Liu 2005-07-11 11:46:10
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时却没有这个问题,能够正常显示。求高手解答啊。
...全文
111 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
Lancelot_Liu 2005-07-11
  • 打赏
  • 举报
回复
还想问一下
Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in c:\inetpub\wwwroot\ent\admin\index.php on line 7
连接数据库失败
是什么意思啊。iis有这个问题。apache却没有。
Lancelot_Liu 2005-07-11
  • 打赏
  • 举报
回复
PHP4.3.3
mikespook 2005-07-11
  • 打赏
  • 举报
回复
你的PHP是什么版本?是否有
$act=$_REQUIST['act'];
Lancelot_Liu 2005-07-11
  • 打赏
  • 举报
回复
顶一下

21,887

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧