IIS下php的配置问题(老问题)

danwei 2003-09-12 03:53:51
我是一个菜鸟,很菜的那种。

软件如下
php-4.3.3-installer.exe
安装完成后,能自动配置好IIS“主目录”,并在winnt\有php.ini,运行phpinfo()也成功。

问题如下
---------who_are_you.php-------
<html>
<head>
<title> Who Are You ? </title>
</head>

<body>
<form action="you_are.php" method="post">
Please enter your name:<br />
I am...
<?php
print('<input type="text" name="person" value="'.$person.'" size="15" />');
?>
<input type="submit" value="Go!" size="15" />
</form>
</body>
</html>
--------------------

---------you_are.php---------
<html>
<head>
<title> You Are... </title>
</head>

<body>
<?php
print('Well,hello'.$person.',nice to meet you!');
print('<br />');
print('<a href="who_are_you.php?person='.urlencode($person).'">Back to Who Are You ?</a>');
?>
</body>
</html>
--------------


错误如下
----------
Notice: Undefined variable: person in c:\inetpub\wwwroot\wangwei\who_are_you.php on line 11
--------

查看winnt\php.ini有define_syslog_variables = Off;已经是关着的了
代码是书上的,抄的肯定没错,那么错在哪里了?
...全文
23 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
feel8 2003-09-13
  • 打赏
  • 举报
回复
具体安装方法请参看这篇文章:
http://www.phpe.net/articles/260.shtml
danwei 2003-09-13
  • 打赏
  • 举报
回复
各位高手能不能讲讲php究竟怎样安装在IIS里,请尽量详细点,因为我很菜。
在下系统:win2000 server;IIS是系统自带;IE5.0
如能相告,不胜感激。
feel8 2003-09-12
  • 打赏
  • 举报
回复
who_are_you.php 没有错误在我机子上,
you_are.php如下

<html>
<head>
<title> You Are... </title>
</head>

<body>
<?php
print('Well,hello'.$_POST['person'].',nice to meet you!');
print('<br />');
print('<a href="who_are_you.php?person='.urlencode($person).'">Back to Who Are You ?</a>');
?>
</body>
</html>
danwei 2003-09-12
  • 打赏
  • 举报
回复
---------you_are.php提示的错误---------
Notice: Undefined variable: person in c:\inetpub\wwwroot\wangwei\you_are.php on line 8
Well,hello,nice to meet you!

Notice: Undefined variable: person in c:\inetpub\wwwroot\wangwei\you_are.php on line 10
danwei 2003-09-12
  • 打赏
  • 举报
回复
对不起没说清楚,这样是不提示错误了,可问题还在啊,我在文本框内填的文字还是没有显示
xuzuning 2003-09-12
  • 打赏
  • 举报
回复
php.ini中error_reporting = E_ALL & ~E_NOTICE
或在程序开头加上:
error_reporting(E_ALL & ~E_NOTICE);
danwei 2003-09-12
  • 打赏
  • 举报
回复
高手们看看哪??

21,886

社区成员

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

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