• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to removing CI controller name

Hi Everyone.

I have a problem with CI routing.
I have a login form (welcome/login) the controller function controlling the input post datas and value of result the controllers show the views.
When i write wrong data into input fileds the controller showing the registration_view
otherwise it show the succes_view.
My problem is the following :

Before submit the path of Js,CSS file is these

After submit the path of Js,CSS file is these, and the browser can't find it
In this case the path of css,js is extends with the controller name "welcome"


1st you should not have assets inside your views folder.

So you need to create a folder in your root called assets or public and all those js and css files should be inside that folder.

Then you can just load those assets like this:

<link href=<?= base_url('assets/css/css_file.css') ?>' rel='stylesheet' type='text/css'>

Thank you it's work Smile

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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