unable to connect with CSS using base_URL and link_tag() |
I have tried this and it works for me.
I do have the base url set in the config $config['base_url'] = 'http://ci3.local/';
On the package it said needs Windows 7 or better. So I installed Linux.
Yeah, your base_url in config/config must be prefixed with http:// or https://
Thanks all... issue resolved with the following code
$config['base_url'] = 'http://localhost/ciblog/';
(06-15-2017, 02:33 PM)hafizfarooq Wrote: I am trying to connect with my CSS using link_tag() but system is not connecting... no errors .. nothing happens Make sure you have set your base url with http:// PHP Code: $config['base_url'] = 'http://localhost/projectname/'; Make sure also assets out side of application folder. php echo And the use <?php echo link_tag('assets/css/bootstrap.min.css'); ?>
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
(06-15-2017, 02:33 PM)hafizfarooq Wrote: I am trying to connect with my CSS using link_tag() but system is not connecting... no errors .. nothing happens That mistake is only permissions
Try viewing the source code of the rendered HTML page and note the echoed PHP string:
<?= link_tag('/assets/css/bootstrap.min.css') ?> |
Welcome Guest, Not a member yet? Register Sign In |