【问题标题】:CodeIgniter Flexi Auth Demo is Not workingCodeIgniter Flexi Auth 演示不工作
【发布时间】:2013-09-10 09:38:27
【问题描述】:

我刚刚完全按照Installation Guide 在我的 Linux 系统上安装了 Flexi Auth 插件

当我导航到代码http://localhost/codeigniter/ 时,它正在显示精美的演示页面。但是,当我从顶部菜单中单击“演示”链接时,其显示页面未找到错误

Not Found

The requested URL /auth_lite/demo was not found on this server.

Apache/2.2.22 (Ubuntu) Server at localhost Port 80

我需要配置我的routes.php 吗?在安装指南中,它说只能像这样编辑默认控制器$route['default_controller'] = "auth_lite/index";

顺便说一下,我是 CodeIgniter 的新手。如果有人遇到这个问题,请帮助我。

【问题讨论】:

    标签: php codeigniter authentication


    【解决方案1】:

    在源文件中搜索“flexi_cart”, 特别是在三个 *library.php 文件中, 有一些字符串条目,必须是 更改为您自己的目录。

    似乎可以适应这种变化。

    【讨论】:

      【解决方案2】:

      听起来您的 .htaccess 文件要么不工作,要么没有按应有的设置。

      服务器正在寻找文件路径 /auth_lite/demo,它应该将字符串传递给 index.php

      这是 CI 最常见的 .htaccess 文件之一。试试看:

      <IfModule mod_rewrite.c>
      RewriteEngine On
      
      # developing in a subfolder? (http://localhost/app/) change this to app/
      RewriteBase / 
      
      #Removes access to the system folder by users.
      #Additionally this will allow you to create a System.php controller,
      #previously this would not have been possible.
      #'system' can be replaced if you have renamed your system folder.
      RewriteCond %{REQUEST_URI} ^system.*
      RewriteRule ^(.*)$ index.php/$1 [L]
      
      #Checks to see if the user is attempting to access a valid file,
      #such as an image or css document, if this isn't true it sends the
      #request to index.php
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      #This last condition enables access to the images and css folders, and the robots.txt file
      #Submitted by Michael Radlmaier (mradlmaier)
      RewriteCond $1 !^(index\.php|images|robots\.txt|css|js|swf|wymeditor|galleries|ffeiliau)
      RewriteRule ^(.*)$ index.php/$1 [L]
      </IfModule>
      

      试试看吧。

      【讨论】:

      • 对不起,它不工作。我尝试使用保存在 codeigniter 根文件夹下的代码
      • 我也用过flex-auth提供的.htaccess。那个也没用
      • 请说明您正在测试的服务器堆栈,以及其他路由是否有效。
      • 我发现的一件事是,当我在 URL 中附加 index.php 时,它的工作原理。
      • 这在使用 XAMP 的 Windows 中运行良好。但是Linux中存在一些问题
      猜你喜欢
      • 2013-01-01
      • 2013-03-11
      • 1970-01-01
      • 2015-04-11
      • 2017-03-10
      • 2012-05-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多