CodeIgniter2.1.0下载地址:http://115.com/file/anlf4sdj#CodeIgniter_2.1.0.zip
1、下载CodeIgniter框架,解压到任意目录下,重命名为你的项目名,如:解压后的目录是D:/phptest/CodeIgniter2.1.0,重命名后:D:/phptest/myproject
2、找到Apache安装目录下的conf / httpd.conf文件,将其打开。
(1)添加一新的端口: Listen 8080(该端口号可任意,建议大于8000)
(2)在文件最后添加以下片段:
NameVirtualHost *.8080 //该端口号与以上新增的端口号相同,下同 <VirtualHost *:8080> ServerName www.myphpdns.com //此处可任意,“www.myphpdns.com”也可写成其他的。如:“www.phpCodeIgniter.com” DocumentRoot D:/phptest/myproject //项目路径,以下的Directory 一样 </VirtualHost> <Directory "D:/phptest/myproject"> Options FollowSymLinks AllowOverride all Order deny,allow allow from all //设置权限 </Directory>
在浏览器上输入:localhost:8080
如出现以下画面则表示配置成功了
The page you are looking at is being generated dynamically by CodeIgniter.
If you would like to edit this page you'll find it located at:
application/views/welcome_message.php
The corresponding controller for this page is found at:
application/controllers/welcome.php
If you are exploring CodeIgniter for the very first time, you should start by reading the User Guide.
Page rendered in 0.0933 seconds