Welcome Guest, Not a member yet? Register   Sign In
Accessing CSS and JS for views
#11

(This post was last modified: 07-25-2018, 10:38 AM by dave friend.)

You don't show how you assign a value to the variable $base_url.

Could it be that when you typed

Code:
<script type="text/javascript" src="<?php echo $base_url . "assets/js/mdb.min.js"?>"></script>

you really meant this?

Code:
<script type="text/javascript" src="<?php echo base_url("assets/js/mdb.min.js"); ?>"></script>
Reply
#12

Yes - precisely. I have just discovered that! Lots of learning going on!

Thanks to all who who have posted here - much appreciated!
Reply
#13

@MightBeABitLate,

Using the following would make the script just that little bit more faster because it does not need to call the base_url() function.

echo VIEWPATH .'...';
Reply




Theme © iAndrew 2016 - Forum software by © MyBB