Bootstrap connects only to localhost/site/ , if you keep localhost/site/index/index (this is the same page), then it will not work anymore. It turns out that it is looking for a bootstrap at the address localhost/site/index/index/View/css/bootstrap.css and it is at the address localhost/site/View/css/bootstrap.css Maybe I am doing something wrong. Site structure mvc. Method Render

  protected function render($templateName) { ob_start(); //динамический контент $render = SITE_DIR . DS . 'View' . DS . $this->name . DS . $templateName . '.php'; if ($render) { include ($render); } //дефолтный шаблон в нем я подключаю bootstrap $content = ob_get_clean(); include SITE_DIR . DS . 'View' . DS . 'Layout' . DS .'default' . '.php'; } 

    1 answer 1

    You need on the page where you want to connect bootstrap to register the global path localhost/site/index/index/View/css/bootstrap.css , but instead of localhost write how it is stored on your computer. This is the first option, and the second is to write it locally In index.html, set the path to /View/css/bootstrap.css .

    • I also have a default template and I hooked up bootstrap in it. This default template is switched off every time. - Anton Pivovarov