把你全部的配置贴上来!
想支持PHP,仅仅那2句是不够的!
ScriptAlias /php4/ "C:/php4/"
Addtype application/x-httpd-php4 .php
Addtype application/x-httpd-php4 .phtml
Addtype application/x-httpd-php4 .php3
Addtype application/x-httpd-php4 .php4
Action application/x-httpd-php4 "/php4/php.exe"

解决方案 »

  1.   

    配置行了,但我从书上的光碟里COPY了几个PHP文件例子,ch4-12a可以运行,输入姓名后,按登录时,没有反应,URL上出现"http;//localhost/ch4-12a/php?errmsg=输入字段不可为空白!",但我明明系有输入姓名的,以下系PHP代码CH4-12a
    <html>
    <title>会员登录网站</title>
    <body>
    <font size=5 color=green>登录画面</font>
    <font color=red><?echo $errmsg;?></font>
    <hr>
    <form action=ch4-12b.php method=POST>
    <table border=0>
     <tr>
    <td>姓名:</td><td><input type=text size=20 name=name></td>
    <td><input type=submit name=SEND value=登录></td></tr>
    </table>
    </form>
    <a href=ch4-12c.php>会员专用网页</a>
    </body>
    </html>
    ch4-12b<?
            If($name =="")
    {
     $errmsg="输入字段不可为空白!";
     Header("Location:ch4-12a.php?errmsg=$errmsg");
    }
            Else
             Header("Location:ch4-12c.php?user=$name");
    ?>
    ch4-12c
    <?
    If($user=="")
    {
     $errmsg="您必须先进行登录才能进入会员专区!";
     Header("Location:ch4-12a.php?errmsg=$errmsg");
    }
    Else
     Setcookie("user",$user,Time( )+30*86400);
    ?>
    <html>
    <title>会员专用网页</title>
    <body background=bground.gif>
    <font size=5 color=red>会员专区</font>
    <hr>
    <font size=5 color=blue><?echo $user;?></font>,观迎光临会员专区
    </body>
    </html>
      

  2.   

    ch4-12b
    开头加上
    $name = $_POST["name"];ch4-12c
    开头加上
    $user = $_POST["user"];教材版本太低了
      

  3.   

    设置php.ini
    将register_globals 设为on即可!
      

  4.   

    thunderx(平生一笑)你真是个天才啊,你QQ多少啊,我可以加你吗?
      

  5.   

    还有个问题,我在书上还有一个聊天室程序,输入名字进入后,页面没有显示出我的名字,输入要说的东西后按确定,页面没有反应,是不是PHP.INI还有什么没有配置?
      

  6.   

    php.ini不是这样修改的,呵呵,那个on还是不开为妙。无所谓拉,以后你就明白了,一个探索的过程