本节内容:
php配置文件操作实例。
php配置选项:
1,php.ini文件的 ;extension=php_pdo_myssql.dll [去掉分号]
2,httpd.conf文件下开启apache的rewrite模块 LoadModule rewrite_module modules/mod_rewrite.so
AllowOverride None => AllowOverride ALL
3,配置虚拟主机
复制代码 代码示例:
# Virtural hosts启动虚拟主机的配置
include conf/extra/httpd-vhosts.conf
<VirtualHost *:80>
ServerAdmin kongdaoxian@gmail.com
DocumentRoot "E:/skydao/apache2/htdocs/zendTest/public"
ServerName zendTest.com
Server
alias www.zendTest.com
DirectoryIndex index.php
<Directory />
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
在hosts文件中加dns
复制代码 代码示例:
127.0.0.1 zendTest
127.0.0.1 www.zendTest.com
4,重启Apache