php - Adding in Module name to template url -


i using modules within codeigniter application , phil sturgeon's template library , i'm trying understand happening when view source code of template. adding on string user name of module.

http://mysite.me/index.php/user/assets/globals/bootstrap/css/bootstrap.min.css

<!--[if gt ie 8]><!--> <html> <!--<![endif]-->  <head>     <title><?php echo $template['title']; ?></title>      <!-- meta -->     <meta charset="utf-8" />     <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0" />     <meta name="apple-mobile-web-app-capable" content="yes" />     <meta name="apple-mobile-web-app-status-bar-style" content="black" />      <!-- bootstrap -->     <link href="<?php base_url() ?>assets/globals/bootstrap/css/bootstrap.min.css" rel="stylesheet" />   -application     -themes         -mytheme             -views                 -layouts                     usermanagement_view.php 

you're not echoing base_url(), i.e. not printing on page...it should be:

<link href="<?php echo base_url() ?>assets/globals/bootstrap/css/bootstrap.min.css" rel="stylesheet" /> 

without it, href attribute gets appended segments in url, that's why result.

maybe meant use short tag <?= , stands <?php echo. in case, don't - they're not enabled in php.ini, , 2 chars spare can big hassle when deploying live.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -