①加载php模块到apache中:
LoadModule php5_module "d:\php5\php5apache2_2.dll"
②加入识别扩展名为.php文件(也可以自定义扩展名)
AddType application/x-httpd-php .php
③ 主页设置
DirectoryIndex index.html index.php
④默认PHP目录设置
DocumentRoot "C:/www”
识别 php.ini 配置文件的位置:
PHPIniDir “php根目录路径"
或
PHPINiDir "php.ini路径”
第二第三步:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
DirectoryIndex index.html index.php
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号