且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

需要PHP的帮助

更新时间:2022-06-22 22:49:11



teddybear写道:

teddybear wrote:
我开始编写PHP但已经遇到问题。
首先,我不知道在哪里放我的PHP代码? IIS Root
目录在哪里? (我正在使用Windows XP)。
Hi, I begin to write PHP but run into problem already.
First, I do not know where to put my PHP code? Where is the IIS Root
Directory? (I''m using Windows XP).




您的根目录是c:\ Inetpub \ www.root



Your root directory is c:\Inetpub\wwwroot


感谢您对根目录的建议。现在我把它放在那里,但是当我从网络浏览器调用它时仍然给我错误的相同信息: http://127.0.0.1/hello.php


以下是错误消息:

< p>这PHP CGI二进制文件是在启用了force-cgi-redirect的情况下编译的。

这个

表示如果REDIRECT_STATUS CGI

变量设置为
,页面才会被提供,例如通过Apache Action指令。< / p>

< p>有关< i>为什么< / i>的更多信息此行为存在,请参阅

< a href =" http://php.net/security.cgi-bin"> CGI手册页

security&lt ; / A&GT;。&LT; / p为H.

< p>有关更改此行为或重新启用

此网络服务器的更多信息,

请参阅此附带的安装文件分发,或

访问

< a href =" http://php.net/install.windows">手册页< / a>。< ; / p为H.


我不知道在哪里修理?
Thanks for your suggestion on the root directory. Now I have put it there, but still gave me error with the same message when I call it from the web browser: http://127.0.0.1/hello.php.

Here is the error message:
<p>This PHP CGI binary was compiled with force-cgi-redirect enabled.
This
means that a page will only be served up if the REDIRECT_STATUS CGI
variable is
set, e.g. via an Apache Action directive.</p>
<p>For more information as to <i>why</i> this behaviour exists, see the
<a href="http://php.net/security.cgi-bin">manual page for CGI
security</a>.</p>
<p>For more information about changing this behaviour or re-enabling
this webserver,
consult the installation file that came with this distribution, or
visit
<a href="http://php.net/install.windows">the manual page</a>.</p>

I do not know where to fix??


WhatsPHP写道:
WhatsPHP wrote:
teddybear写道:
teddybear wrote:
我开始编写PHP但已经遇到问题。
首先,我不知道在哪里放我的PHP代码? IIS Root
目录在哪里? (我正在使用Windows XP)。
Hi, I begin to write PHP but run into problem already.
First, I do not know where to put my PHP code? Where is the IIS Root
Directory? (I''m using Windows XP).



您的根目录是c:\ Inetpub \ www.root



Your root directory is c:\Inetpub\wwwroot




感谢您提醒我,我必须将我的hello.php放在

C:\Inetpub \ www.root文件夹中。我把它放在那里,但当我尝试用 http打电话给

时://127.0.0.1/hello.php



问题仍然存在,它说:


< p> ;这个PHP CGI二进制文件是在启用了force-cgi-redirect的情况下编译的。

这个

表示只有REDIRECT_STATUS CGI
$才能提供页面b $ b变量是

设置,例如通过Apache Action指令。< / p>

< p>有关< i>为什么< / i>的更多信息此行为存在,请参阅

< a href =" http://php.net/security.cgi-bin"> CGI手册页

security&lt ; / a>。< / p>

< p>有关更改此行为或重新启用

此网络服务器的更多信息,

请查阅此发行版附带的安装文件,或

访问

< a href =" http://php.net/install.windows"&gt ;手册页< / a>。< / p>


有什么问题?是不是我必须指出PHP编译器在哪里?
?或者我应该如上所述修改REDIRECT_STATUS CGI

变量,以及我在哪里可以找到REDIRECT_STATUS

变量?

请帮助并谢谢你!


--Ted



Thanks for reminding me that I have to put my hello.php in the
C:\Inetpub\wwwroot folder. I have put it there, but when I try to call
with http://127.0.0.1/hello.php,

the problem still there, it said:

<p>This PHP CGI binary was compiled with force-cgi-redirect enabled.
This
means that a page will only be served up if the REDIRECT_STATUS CGI
variable is
set, e.g. via an Apache Action directive.</p>
<p>For more information as to <i>why</i> this behaviour exists, see the
<a href="http://php.net/security.cgi-bin">manual page for CGI
security</a>.</p>
<p>For more information about changing this behaviour or re-enabling
this webserver,
consult the installation file that came with this distribution, or
visit
<a href="http://php.net/install.windows">the manual page</a>.</p>

What is the problem? Can it be that I have to point in the PATH where
the PHP compiler is? Or should I modify the REDIRECT_STATUS CGI
variable as stated above, and where I can find the REDIRECT_STATUS
variable?
Please help and thank you!

--Ted