• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
unable to connect with CSS using base_URL and link_tag()

#11
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.
Reply

#12
Yeah, your base_url in config/config must be prefixed with http:// or https://
Reply

#13
Thanks all... issue resolved with the following code
$config['base_url'] = 'http://localhost/ciblog/';
Reply

#14
(06-15-2017, 03: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'); ?>
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.