Welcome Guest, Not a member yet? Register   Sign In
define base_url()
#1

How to define base_url();

I am trying to define base_url ( ) ;

Any idea how to?

Instead of www.website.com I would like localhost/website/

for example - any clue?

Thanks in advance.
" If I looks more intelligence please increase my reputation."
Reply
#2

Here's a webpage full of clues: https://codeigniter.com/userguide3/
Reply
#3

(This post was last modified: 04-07-2016, 01:40 AM by davy_yg. Edit Reason: clear clue )

Okay looks good!  Now, I am trying to post this:

views/cms/index.php


PHP Code:
<link href"<?php echo base_url();?>style.css" rel="stylesheet" type="text/css" media="screen">
<
script src="js/jquery.min.js" type="text/javascript"></script>
<
script src="js/chili-1.7.pack.js"></script>
<
script src="js/jquery.cycle.all.js" type="text/javascript"></script>
<
script src="js/jquery.easing.1.3.js" type="text/javascript" ></script

I am trying to make style.css works!  I wonder why my style.css does not work.
" If I looks more intelligence please increase my reputation."
Reply
#4

(04-07-2016, 01:39 AM)davy_yg Wrote: Okay looks good!  Now, I am trying to post this:

views/cms/index.php


PHP Code:
<link href"<?php echo base_url();?>style.css" rel="stylesheet" type="text/css" media="screen">
<
script src="js/jquery.min.js" type="text/javascript"></script>
<
script src="js/chili-1.7.pack.js"></script>
<
script src="js/jquery.cycle.all.js" type="text/javascript"></script>
<
script src="js/jquery.easing.1.3.js" type="text/javascript" ></script

I am trying to make style.css works!  I wonder why my style.css does not work.
If your css files are in de folder /css then try:

PHP Code:
echo base_url().'css/style.css'
Reply
#5

echo base_url('css/style.css');
          Heart  love codeigniter Heart
          Learning  best  practices
     Rate my post if you found it helpfull
Reply




Theme © iAndrew 2016 - Forum software by © MyBB