【发布时间】:2020-06-13 15:24:46
【问题描述】:
我有一个 Codeigniter 网站,我希望用户和管理员能够通过下面显示的主网站示例访问各自的系统,我在 routes.php 中设置了主控制器,并且我在下面为管理员和用户生成了文件夹控制器文件夹和视图文件夹。主网站运行良好,但是当我单击链接以登录管理员或用户时出现 404 错误,我不确定我是否正确实现了结构或其逻辑错误。这是如何从主站点调用用户登录的示例
<?php echo base_url(); ?>user/user.php">
Routes.php
$route['default_controller'] = 'home';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;
项目树形结构
Fun4lend
├─ .editorconfig
├─ .gitignore
├─ application
│ ├─ .htaccess
│ ├─ config
│ │ ├─ autoload.php
│ │ ├─ config.php
│ │ ├─ constants.php
│ │ ├─ database.php
│ │ ├─ doctypes.php
│ │ ├─ foreign_chars.php
│ │ ├─ hooks.php
│ │ ├─ index.html
│ │ ├─ memcached.php
│ │ ├─ migration.php
│ │ ├─ mimes.php
│ │ ├─ profiler.php
│ │ ├─ routes.php
│ │ ├─ smileys.php
│ │ └─ user_agents.php
│ ├─ controllers
│ │ ├─ admin
│ │ │ └─ Welcome.php
│ │ ├─ Auth.php
│ │ ├─ home.php
│ │ ├─ index.html
│ │ └─ user
│ │ └─ Auth.php
│ ├─ core
│ │ └─ index.html
│ ├─ helpers
│ │ └─ index.html
│ ├─ hooks
│ │ └─ index.html
│ ├─ index.html
│ ├─ language
│ │ ├─ english
│ │ │ └─ index.html
│ │ └─ index.html
│ ├─ libraries
│ │ └─ index.html
│ ├─ models
│ │ ├─ index.html
│ │ └─ register_model.php
│ ├─ third_party
│ │ └─ index.html
│ └─ views
│ ├─ about.php
│ ├─ about_us.php
│ ├─ admin
│ ├─ errors
│ │ ├─ cli
│ │ │ ├─ error_404.php
│ │ │ ├─ error_db.php
│ │ │ ├─ error_exception.php
│ │ │ ├─ error_general.php
│ │ │ ├─ error_php.php
│ │ │ └─ index.html
│ │ ├─ html
│ │ │ ├─ error_404.php
│ │ │ ├─ error_db.php
│ │ │ ├─ error_exception.php
│ │ │ ├─ error_general.php
│ │ │ ├─ error_php.php
│ │ │ └─ index.html
│ │ └─ index.html
│ ├─ homepage.php
│ ├─ home_loan.php
│ ├─ index.html
│ ├─ loan_business.php
│ ├─ loan_property.php
│ ├─ loan_register.php
│ ├─ loan_system.php
│ ├─ personal_loan.php
│ ├─ site.php
│ ├─ user
│ │ ├─ loan_register.php
│ │ └─ user.php
│ └─ welcome_message.php
【问题讨论】:
-
请显示您的路线
-
@Vickel 我已添加
标签: php codeigniter