标签:style http color os strong 文件 io art
1.拷贝PHP配置文件
cd /usr/local/php/etc
cp php.ini /usr/local/php/lib/php.ini
2.修改apache配置文件
vi /usr/local/apache/conf/httpd.conf
添加对php的支持:
LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php(注意中间有个空格)
3.测试
1)编写一个php文件,如phpinfo.php
vi /usr/local/apache/htdocs/phpinfo.php
输入:
<?php
phpinfo();
?>
保存-> :wq
2)重新启动apach:
/usr/local/apache/bin/apachectl restart
3)浏览器打开:http://localhost/phpinfo.php
标签:style http color os strong 文件 io art
原文地址:http://www.cnblogs.com/lxt287994374/p/3880513.html