需要PHP的帮助 [英] Need help on PHP

查看:72
本文介绍了需要PHP的帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始编写PHP但已遇到问题。

首先,我不知道在哪里放我的PHP代码? IIS Root

目录在哪里? (我正在使用Windows XP)。


我运行安装程序...但是当我打开浏览器并输入:
http://localhost/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< ; / a>。< / p>

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

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

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

访问

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

我真的不明白如何制作我的第一个PHPHello World

工作?


我将非常感谢您的帮助!

谢谢!


-Ted

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).

I have run Installer... but when I open my browser and type:
http://localhost/hello.php, what I got is an 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 really do not understand how to make my first PHP "Hello World"
works?

I will greatly appreciate of your help!
Thank you!

-Ted

推荐答案



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< ; / A>。< / 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< ; / a>。< / p>

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

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

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

访问

< a href =" http://php.net/install.windows"> ;手册页< / 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


这篇关于需要PHP的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆