2014-01-15 61 views
2

我有一个网站源代码内置codeigniter。我试图将其设置到本地wamp服务器,但无法正常工作。如何整合codeigniter网站从现场到本地服务器

我已经做以下的事情:

  1. 创建数据库UTF-8与数据库名称“FC2”和进口活的服务器数据库。
  2. 通过设置base_url来配置aplications/config/config.php。
  3. 通过设置数据库主机,用户名,密码和数据库名称配置aplications/config/database.php。

但它不工作。 (附上屏幕截图)。

enter image description here

.htaccess文件看起来像这样

enter image description here

请帮我这个问题。

在此先感谢

+0

什么是htaccess文件? –

+0

我已更新我的问题。请检查一下。 – user3165099

+0

发生了什么错误,是否在页面上显示任何内容? –

回答

0

尝试在.htaccess

<IfModule mod_rewrite.c> 
    RewriteEngine On 
    RewriteBase/

    RewriteCond %{REQUEST_URI} ^sys.* 
    RewriteRule ^(.*)$ /index.php?/$1 [L] 

    RewriteCond %{REQUEST_URI} ^app.* 
    RewriteRule ^(.*)$ /index.php?/$1 [L] 

    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteRule ^(.*)$ index.php?/$1 [L] 
</IfModule> 
<IfModule !mod_rewrite.c> 
    ErrorDocument 404 /index.php 
</IfModule> 

assumming是的index.php是你的索引页。

sys是您的系统文件夹和应用程序是您的应用程序文件夹。

,并在config.php

$config['index_page'] = ''; 
+0

它不适合我。请给我另一个解决方案。 – user3165099

0

变化我认为这个问题是与htaccess的。试试这个

RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ /FOLDER_NAME/index.php?/$1 [L] 

将FOLDER_NAME更改为本地目录的名称。

0

检查您是否已经把基本的URL与config.php文件中的 “http://”。如果不把 “HTTP://” 和检查

+0

是的我已经把完整的路径与http:// – user3165099

0

请试试这个:

RewriteEngine on 

RewriteCond %{REQUEST_FILENAME} !-d 

RewriteRule ^(.*)$ /folder_name/index.php?/$1 [L] 
0

另外检查php是否正确安装在堆栈中。

也许重新安装WAMP堆栈可能会有所帮助。

或者我会好奇地检查一下XAMPP,看看它是否与wamp有关。

相关问题