如何击败php安装错误的问题?

XIAOGUAIGUAI 2003-09-12 09:26:51

小女偶感心血来潮,想着手探试PHP这位出手极度大方的开放哥哥一番。

只是PHP安装老出问题,晕晕,真不知如何是好,还望CSDN上的各位大虾们指点三四,

帮我过关才好。

PHP的版本为:php-4.3.3RC4-Win32

APACHE的版本为:apache_2.0.47-win32-x86-no_ssl

让我晕晕的是系统好象根本不认识PHP这个刚刚加入的宠儿,

我在APACHE里面设置为DocumentRoot "C:/Apache/Apache2/web/"

可是我在web文件夹里面写了一个index.php文件内容如下:
<html>
<head>test</head>
<body>
<?p
ehco"It's ok "
?>
</body>
</html>

居然输出test,怎么回事情啊。
...全文
63 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
vitalgg 2003-09-12
  • 打赏
  • 举报
回复
<html>
<head>

<title>test</title>

</head>
<body>
<?php
echo "It\'s ok ";
?>
</body>
</html>
ashchen 2003-09-12
  • 打赏
  • 举报
回复
最近小女子挺多的 :)
If you wish to install PHP as a CGI binary, read this first:

http://www.cert.org/advisories/CA-1996-11.html

and then if you are really sure, insert these lines to your conf file:

ScriptAlias /php/ "c:/php/"
Action application/x-httpd-php "/php/php.exe"

Note, we consider installing PHP like this suicidal.

As a further precaution, we recommend you change the "/php/"
ScriptAlias to something more random, to prevent the binary being
called directly, which is a security risk.

Remember when you have finished to restart the server, for example,
NET STOP APACHE
followed by
NET START APACHE

To use the source code highlighting feature, add the following
line to your apache httpd.conf file:

AddType application/x-httpd-php-source .phps

Note, this will only work when you install php as a sapi module.
If you wish to use this feature with the cgi binary, create a new
file, and use the show_source("path/to/original_file.php"); function.
feel8 2003-09-12
  • 打赏
  • 举报
回复
http://phpe.net/articles/260.shtml

XIAOGUAIGUAI 2003-09-12
  • 打赏
  • 举报
回复
输出依旧为test

可能是PHP安装有问题,可是就是简单的几个操作啊:

解压-复制到c:\php文件夹-改后缀php.ini复制到system中.


有问题吗?
feel8 2003-09-12
  • 打赏
  • 举报
回复
<html>
<head>test</head>
<body>
<?php
echo "It\'s ok ";
?>
</body>
</html>
blueoxygen 2003-09-12
  • 打赏
  • 举报
回复
<?php
echo "it's okay";
?>
XIAOGUAIGUAI 2003-09-12
  • 打赏
  • 举报
回复
解决问题

谢谢各位

21,882

社区成员

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

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