8、HTTPD服务--CGI机制
目录
1、测试PHP页面
2、安装php软件
一、CGI机制介绍
1、测试PHP页面
[root@localhost ~]# cat /mp3/test1.php
AAAAAAAAAAAAA
<?phpphpinfo();
?>
2、安装php软件
# yum install -y php
# systemctl restart httpd
php实际上是作为httpd的功能模块存在的
[root@localhost ~]# ls /etc/httpd/modules/
libphp5.so
[root@localhost ~]# cat /etc/httpd/conf.modules.d/10-php.conf
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#
<IfModule prefork.c>LoadModule php5_module modules/libphp5.so
</IfModule>
一、CGI机制介绍
Common Gateway Interface 通用网关接口
作用:
让web进程通过CGI机制调用其他的应用程序,解析动态网站