1:C:\xampp\apache\conf\extra\httpd-vhosts.conf
<VirtualHost *:80>
#管理员邮箱
#ServerAdmin
jiangfeng3@staff.sina.com.cn
#项目根目录
#DocumentRoot "E:\mis.iciba.com\trunk\wwwroot" 需要配置
DocumentRoot "E:\code\CodeIgniter-3.0.4"
#域名 随意可为IP地址127.0.0.1
ServerName xingying.com
#别名
#ServerAlias mis.iciba.com
#错误日志路径
ErrorLog "logs/127.0.0.2.log"
CustomLog "logs/127.0.0.2.log" common
</VirtualHost>
2:C:\Windows\System32\drivers\etc\hosts
加上!
127.0.0.1 xingying.com
3:停止apache服务,并重新启动
4:在浏览器中输入
xingying.com/index.php?c=jayjun
就可输出文件
jayjun里面方法index的内容.
5:
E:\code\CodeIgniter-3.0.4\application\config\config.php
$config
[
'enable_query_strings'
] =
TRUE
;