如果不用內置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>