如何让CakePHP加载我的 / src目录而不是vendor / maiconpinto / cakephp-adminlte-theme / src

问题描述 投票:0回答:1

摘要: 我是一个web和后端newb,但基本上我继承了CakePHP项目,我正在尝试建立一个开发环境。我正在尝试在http:// localhost / backend /上显示我的项目级src目录,它自动转到http:// localhost / backend / admin / users / dashboard,但它只加载PROJECT_ROOT / vendor / maiconpinto / cakephp -adminlte主题/ src目录。

题: 如何使用我的顶级src目录加载自己的侧边栏?提前致谢! 这是所需的侧边栏:correct myteamconnector sidebar 这是正在加载的侧边栏:incorrect vendor files sidebar

设置信息: 系统:Mac OS 10.14开发应用程序:

  • AMPPS vz.8
  • Apache v2.4.27
  • PHP v7.1
  • MySQL v5.6.37
  • KakePHP vz.5.17

PROJECT_ROOT / index.php文件:

require 'webroot' . DIRECTORY_SEPARATOR . 'index.php';

PROJECT_ROOT / Webroot公司/ index.php文件:

// Check platform requirements
require dirname(__DIR__) . '/config/requirements.php';

// For built-in server
if (php_sapi_name() === 'cli-server') {
    $_SERVER['PHP_SELF'] = '/' . basename(__FILE__);

    $url = parse_url(urldecode($_SERVER['REQUEST_URI']));
    $file = __DIR__ . $url['path'];
    if (strpos($url['path'], '..') === false && strpos($url['path'], '.') !== false && is_file($file)) {
        return false;
    }
}
require dirname(__DIR__) . '/vendor/autoload.php';

use App\Application;
use Cake\Http\Server;

// Bind your application to the server.
$server = new Server(new Application(dirname(__DIR__) . '/config'));

// Run the request/response through the application and emit the response.
$server->emit($server->run());
php cakephp dashboard vendor ampps
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.