小编bag*_*pct的帖子

无法在codeigniter中调用控制器

我在Codeigniter项目中有两个应用程序.下面是结构:

/admin
    /index.php
/application
    /admin
        /controllers
           /Dashboard
           /Product
           /Post
    /public
        /controllers
           /Home
           /About
           /Contact
/system
/index.php
Run Code Online (Sandbox Code Playgroud)

公共应用程序可以正常工作.我可以使用此设置调用所有控制器:

/*----seting in /index.php---*/
$application_folder = 'application/public';

/*----seting in /application/public/config/config.php---*/
$config['base_url'] = 'http://localhost/myweb/';

/*----seting in /application/admin/config/routes.php---*/
$route['default_controller'] = 'Home';
Run Code Online (Sandbox Code Playgroud)

但是,Admin应用程序无法正常工作.我只能调用Dashboard控制器,这是我设置的默认控制器.设置看起来像这样:

/*----setting in /admin/index.php---*/
$application_folder = '../application/admin';

/*----seting in /application/admin/config/config.php---*/
$config['base_url'] = 'http://localhost/myweb/admin/';

/*----seting in /application/admin/config/routes.php---*/
$route['default_controller'] = 'Dashboard';
Run Code Online (Sandbox Code Playgroud)

所以,当我访问时:

http://localhost/myweb/                  //it will return home page
http://localhost/myweb/admin             //it will return dashboard page
http://localhost/myweb/admin/product     //it will return error
Run Code Online (Sandbox Code Playgroud)

任何人都可以帮我解决这个案子吗?

php codeigniter codeigniter-3

5
推荐指数
1
解决办法
558
查看次数

如何修复错误 NETSDK1 project.assets.json 文件未找到。运行 NuGet 包还原以生成此文件

我无法运行我的新 .netcore mvc 应用程序。依赖项总是显示警告图标。 警告图标

运行我的新 asp.net mvc 应用程序时收到此错误消息 错误信息 经过几个小时的搜索,我得到了一些答案。但答案仍然无法应用于运行我的应用程序。我曾尝试使用dotnet restorenuget restoredotnet build等,但仍然没有人解决这个问题。当我运行时dotnet restore出现此消息 恢复后报错

当我运行时nuget restore出现此消息 错误 nuget 还原

之前我用的是Microsoft Visual Studio 2017,卸载了,换成了Microsoft Visual Studio 2019,安装Microsoft Visual Studio 2019时有冲突吗?

我只想运行我的应用程序。但我不知道我的申请有什么问题?

希望你们中的一些人可以帮助我。先感谢您

.net c# asp.net-mvc .net-core asp.net-core

1
推荐指数
1
解决办法
6625
查看次数