Reputation: 13
Hi I have the following file set up inside public_html
/application
/views
index.php
/assets
/css
styles.css
kube.min.css
/js
js.js
and a few other things in there, some of the js files actually seem to be working, because it's picking up Paypal buttons but the links are no different at the start. Examples below.
<link href='http://fonts.googleapis.com/css?family=Handlee' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="http://deborahspsychicreadings.com/_/assets/css/kube.min.css" />
<link rel="stylesheet" href="http://deborahspsychicreadings.com/_/assets/css/styles.less.css" rel="stylesheet/less" />
<link rel="stylesheet" href="http://deborahspsychicreadings.com/_/assets/css/start/jquery-ui-1.10.4.custom.min.css" />
<script src="assets/js/jquery-ui-1.10.4.custom.min.js"></script>
<script src="assets/js/js.js"></script>
<script src="assets/js/paypal.js"></script>
On the test site the path is a bit different (for the actual folders) because it's not in the root. The same files as above are also inside a folder called index, but when I try this on the client server it doesn't work at all.
Tried adding ../ or ./ or / to the beginning or http://sitename.com/ after reading other suggestions but nothing seems to be working.
Upvotes: 0
Views: 255
Reputation: 7675
You need to use base_url() of codeigniter. Use the following syntax:
<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>assets/css/styles.css">
Please make sure that you configure your base_url in config.php at line 17.
Upvotes: 0
Reputation: 469
please use site_url() function
<link rel="stylesheet" type="text/css" href="<?php echo base_url('assets/css/kube.min.css'); ?>">
Upvotes: 2