如果不用内置sever去开发项目,输入网址会报object ........,则按照下列步骤即可使用安装开发环境
yii写的网站根目录在web下
第一步:要在httpd.conf中打开apache的rewrite模块
第二步:
在web下建立.htaccess文件,文件内容如下
- <IfModule mod_rewrite.c>
- Options +FollowSymLinks
- IndexIgnore */*
- RewriteEngine on
- # if a directory or a file exists, use it directly
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteCond %{REQUEST_FILENAME} !-d
- # otherwise forward it to index.php
- RewriteRule . index.php
- </IfModule>