配置个本地环境玩
1. apache配置文件httpd.conf虚拟主机打开
# Virtual hosts Include conf/extra/httpd-vhosts.conf
2. apache配置文件httpd.conf中rewrite打开
LoadModule rewrite_module modules/mod_rewrite.so
3. \wamp\bin\apache\apache2.2.22\conf\extra\httpd-vhosts.conf中配置虚拟主机
<VirtualHost *:80> DocumentRoot "C:/wamp/www/story6107/" ServerName api.xxx.com <Directory "C:/wamp/www/story6107/"> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] </Directory> </VirtualHost>
4. 如果用到Redis,需要增加Redis扩展,下载好后放在ext目录,并在扩展中打开它
5. 如果用到CURL扩展,需要打开php.ini中的
extension_dir = "./" extension_dir = "ext"
extension=php_curl.dll
如果恰好是Win7*64bit的环境,那么恭喜你,curl很可能打开也用不了,需要下载新的组件
下载地址参见:https://skydrive.live.com/?cid=184f32b4e21dae27&id=184F32B4E21DAE27%214863
最后看下phpinfo即可知道组件是否正常工作。