【问题标题】:Flexi Auth Demo + Codeigniter not working on Xampp LocalhostFlexi Auth Demo + Codeigniter 无法在 Xampp Localhost 上运行
【发布时间】:2013-03-11 04:30:21
【问题描述】:

我在我的在线网站上安装了 flexi auth demo,效果很好。

但是我在本地主机上有问题。我想自定义它,为此我需要在 localhost 上工作。我有以下设置:带有 CI + XAMPP + Windows 7 的本地主机

目录结构:

http://localhost/xampp/prj/pub    <- Here I have index.php & .htaccess file
http://localhost/xampp/prj/main/system      <- This is CI System folder
http://localhost/xampp/prj/main/application <- This is CI Application folder

我的 .htaccess 文件是:

IndexIgnore *
RewriteEngine On
RewriteBase /prj/pub/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php [L,QSA]

我使用 [http://localhost/xampp/prj/pub] 访问 flexi auth 演示并打开主页。但是当我点击“Try the Demo”时,它会将我带到 xampp 默认的 Web 根目录,即 [http://localhost/xampp] 并显示此文件夹的目录列表。

我一直在通过更改基本路径和不同的 .htaccess 参数进行检查,但没有成功。目前我已经在 auth_lite.php 文件中设置了我的基本网址:[http://localhost/xampp/prj/pub/]。

我认为问题出在 .htaccess 或需要更改 xampp 的设置。

谁能帮帮我?

【问题讨论】:

    标签: .htaccess codeigniter authentication xampp


    【解决方案1】:

    尝试将您的 prj 文件夹移出 xampp 目录,使其成为 htdocs 文件夹的子目录。然后你可以通过http://localhost/prj访问它

    您可能还需要更改配置文件中的base_url:application/config/config.php

    任何错误都可以在你的 xampp 根目录的 php/logs 目录中找到。

    【讨论】:

      【解决方案2】:

      在 config.php 中

      $config['uri_protocol'] = 'AUTO';
      

      改成

      $config['uri_protocol'] = 'PATH_INFO';
      

      在 codignater 框架中

      【讨论】:

        猜你喜欢
        • 2011-05-02
        • 1970-01-01
        • 2015-02-25
        • 2011-06-02
        • 1970-01-01
        • 2015-03-31
        • 2013-01-01
        • 1970-01-01
        • 2013-04-10
        相关资源
        最近更新 更多