Welcome Guest, Not a member yet? Register   Sign In
unable to connect with CSS using base_URL and link_tag()
#14

(This post was last modified: 06-19-2017, 11:16 PM by wolfgang1983.)

(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

Code:
<!DOCTYPE html>
<html>
   <head>
       <meta charset="UTF-8">
       <title>Articles List</title>
       <?= link_tag('assets/css/bootstrap.min.css') ?>
   </head>
   <body>
       <h1>Hellooooo</h1>
   </body>
</html>

in controller
PHP Code:
<?php
    class User 
extends MY_Controller
    
{
 
       public function index()
 
       {
 
           $this->load->helper('html');
 
           $this->load->view('public/articleslist');
 
       }
 
   }
?>

please help...
Farooq

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!
Reply


Messages In This Thread
RE: unable to connect with CSS using base_URL and link_tag() - by wolfgang1983 - 06-19-2017, 11:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB