php - Render a view in slim does'nt show the view with its css and bootstrap -


i'm new in slim framework , in php 5, i've copied template folder download internet on folder '/template' 'template.path' , i've renamed folder download '/default' . when want render view page 'default' folder i've written:

 $app->get('/auth', function() use ($app) {         $app->render('/default/pages/examples/lockscreen.html');     }); 

when go http://localhost/site/index.php/auth, shows me content without css , bootstrap.

and in lockscreen.html, link css , bootstrap file written that:

<link href="../../dist/css/adminlte.min.css" rel="stylesheet" type="text/css" /> <link href="../../bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> 

and architecture of folder /default :

  • /template
    • /default
      • /bootstrap
      • /build
      • /dist
      • /pages
        • /examples
          • lockscreen.html

it's hard give correct answer without knowing site's complete directory structure, reason template file not pulling in .css files because generated page (normally) relative site's public (web) root, not template file. so, example, if web root /default, css includes in template should be:

<link href="/dist/css/adminlte.min.css" rel="stylesheet" type="text/css" /> <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> 

it know index.php file located within directory structure - should located in site's public root folder.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -