• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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, 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

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

in controller
PHP Code:
    class User 
extends MY_Controller
       public function index()

please help...

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!

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

Users browsing this thread:
1 Guest(s)

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