WAMPSERVER+CodeIgniter环境搭建

一、所需软件

WampServer2.0i

sourceforge下载地址:http://sourceforge.net/projects/wampserver/files/WampServer%202/WampServer%202.0/WampServer2.0i.exe

官方主页下载:http://www.wampserver.com/en/download.php

 

codeigiter 1.7.1

下载地址:http://codeigniter.com/download_files/CodeIgniter_1.7.1.zip

官方下载主页:http://codeigniter.org.cn/user_guide/installation/downloads.html

 

二、搭建环境

1.安装WampServer2.0i

此过程直接点击下一步即可,安装最后会提示httpd.exe需要访问网络,点击允许即可,安装后会在系统栏显示出一个WampServer图标,单击图标选择localhost会自动打开http://localhost/ 页面,此时WampServer2.0i安装成功

 

2.拷贝源码到web目录

点击右下角图标选择“www directory”打开WWW目录,替换自己代码进去、

 

3.编辑php.ini

点击右下角图标选择PHP->php.ini

 

修改 short_open_tag = Off 为 short_open_tag = On 打开短连接,让PHP识别"

4.编辑httpd.conf

点击右下角图标选择Apache->httpd.conf

找到#LoadModule rewrite_module modules/mod_rewrite.so 去掉前面的“#”

 

5.重启启动所有服务(点击右下角图标)

 

6.访问http://localhost如果出现下列错误:

 

Deprecated: Assigning the return value of new by reference is deprecated in C:/wamp/www/system/codeigniter/Common.php on line 130

Deprecated: Assigning the return value of new by reference is deprecated in C:/wamp/www/system/codeigniter/Common.php on line 136

A PHP Error was encountered

Severity: 8192

Message: Call-time pass-by-reference has been deprecated

Filename: libraries/MY_Controller.php

Line Number: 308

db_error_heading

Unable to connect to your database server using the provided settings.

编辑www目录下 index.php  “error_reporting(E_ALL);" 替换成error_reporting(E_ALL & ~E_DEPRECATED);

 

然后执行步骤5.重启启动所有服务

你可能感兴趣的:(WAMPSERVER+CodeIgniter环境搭建)