安装PHP不起作用 [英] Installation Php do not work

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

问题描述

大家好,

我想在Windows Vista Home Basic中安装php.

我做了以下步骤:

1)我已安装apache 2.2.19
2)我下载了php-5.2.17
3)我将文件夹c:/php放入所有下载的文件中.
4)我将php.ini-recomended重命名为php.ini,并在其中进行更改.
例如:
display_errors =开启
extension_dir ="./ext"
扩展程序= php_mysql.dll
扩展程序= php_mysqli.dll

5)我将httpd.conf重写为apache并放入以下行:

< b>

#对于PHP5
LoadFile"C:/php/php5ts.dll"
LoadModule php5_module"C:/php/php5apache2_2.dll"

< IfModule php5_module>
PHPIniDir"C:/php"
#PHPIniDir"C:/Winnt"

<位置/>
AddType文本/html .php .phps
AddHandler应用程序/x-httpd-php .php
AddHandler应用程序/x-httpd-php-source .phps
</位置>

</IfModule>
</b>

5)重新启动服务.

我做了nex简单的php页面:
< b>
< html>
< head>
< title> PHP中的Hello</title>
</head>
< body>
< h1> HELLO IN PHP</h1>
< ;?
打印你好,世界!";
phpInfo();
?>
</body>
</html>
</b>

但是apache服务器仅向我显示一个页面:"HELLO IN PHP"
并且定界符php之间的代码(< ;?和?>)不执行.为什么??

有什么问题吗?
请我帮忙,

再次感谢,

Leonardo Ayala R.

解决方案

您可以将更新的php.ini文件放在"C:/windows"中,然后重新启动服务.

希望能有所帮助:)

如果有进一步的疑问,请在这里发表评论!

Hello Everybody,

I want to install php in my windows vista home basic.

I made the next steps:

1) I was Installed apache 2.2.19
2) I download php-5.2.17
3) I make the folder c:/php and put all the files downloaded.
4) I renamed php.ini-recomended into php.ini and make changes inside.
for example:
display_errors = On
extension_dir = "./ext"
extension=php_mysql.dll
extension=php_mysqli.dll

5) I re-write the httpd.conf into apache and put this lines:

<b>

#For PHP5
LoadFile "C:/php/php5ts.dll"
LoadModule php5_module "C:/php/php5apache2_2.dll"

<IfModule php5_module>
PHPIniDir "C:/php"
#PHPIniDir "C:/Winnt"

<Location />
AddType text/html .php .phps
AddHandler application/x-httpd-php .php
AddHandler application/x-httpd-php-source .phps
</Location>

</IfModule>
</b>

5) restarting the service.

I made the nex simple php page:
<b>
<html>
<head>
<title>Hello in PHP</title>
</head>
<body>
<h1>HELLO IN PHP</h1>
<?
print "Hello, world!";
phpInfo();
?>
</body>
</html>
</b>

But the apache server show to me a page only just: "HELLO IN PHP"
and the code between delimiter php (<? and ?>) do not execute . why????

what is wrong???
Please I need your help,

Thanks again,

Leonardo Ayala R.

解决方案

You can put your updated php.ini file in ''C:/windows'' and restart the services.

Hope this help :)

If further queries comment here!!


you xammp sever which include appachi server and php and mysql so best is install xampp sever


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

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