Welcome Guest, Not a member yet? Register   Sign In
base_url() problem

Hello everybody, 

Hi everyone, I have a problem with base_url
I do not understand why when I put <?php echo base_url ()?> asset / css / style.css
I can not reach my destination.
The link is correct in fact if I write the same in the browser I get to the css file.
in practice from what I understand the result I get is: localhost / site / localhost / asset / css / style.css
how can i get:
localhost / assets / css / style.css
using base_url ();

(This post was last modified: 03-26-2018, 02:22 PM by InsiteFX.)

<!-- Custom Web Application CSS Overrides. -->
<link href="<?php echo base_url('assets/css/style.css'); ?>" rel="stylesheet">

But you are saying asset when in fact it is assets below bottom line.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

Why do you need to use base_url at all? Why not:

<link href="/asset/css/style.css" rel="stylesheet">

Theme © iAndrew 2016 - Forum software by © MyBB