继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

php服务器的塔建

潇潇雨雨
关注TA
已关注
手记 165
粉丝 25
获赞 128

1、获取安装包php.i686;

2、安装php.i686

rpm -ivh php.i686

3、配置apache让其支持php

vi

#

# AddType allows you to add to or override the MIME configuration

# file mime.types for specific file types.

#

#AddType application/x-tar .tgz

AddType application/x-httpd-php .php             \\新添加语句(前面有空格)

AddType application/x-httpd-php-source .phps     \\新添加语句(前面有空格)


4、配置PHP服务器

vi /etc/php.ini

; Whether or not to register the EGPCS variables as global variables.  You may

; want to turn this off if you don't want to clutter your scripts' global scope

; with user data.  This makes most sense when coupled with track_vars - in which

; case you can access all of the GPC variables through the $HTTP_*_VARS[],

; variables.

; You should do your best to write your scripts so that they do not require

; register_globals to be on;  Using form variables as globals can easily lead

; to possible security problems, if the code is not very well thought of.

; http://www.php.net/manual/en/ini.core.php#ini.register-globals

register_globals = On    \\把register_globalsA的值改为on


5、启重apache

service httpd restart


6、测试PHP是否安装成功

写一个php测试页面info.php,放在apache的根目录/var/www/html下,其内容如下

<?php

 phpinfo();

?>

在浏览器上输入127.0.0.1/info.php,如果能正常显示出php信息,则说明PHP安装成功!



打开App,阅读手记
0人推荐
发表评论
随时随地看视频慕课网APP