[eluser]Assim[/eluser]
Let's say I have this view file:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html >
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>MySite</title>
<link rel="icon shortcut" href="images/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="css/style.css" media="all" type="text/css" />
</head>
<body id="index">
<div class="contents">
<h1>Title here</h1>
I want the to put the site's full address behind images/favicon.ico and behind csss/style.css because they won't work in all the pages because of CodeIgniter's URLs. I tried putting:
<?php echo base_url(); ?>
But it didn't work, what am I doing wrong.
This is the code after editing (added <?php echo base_url(); ?>
:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html >
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>MySite</title>
<link rel="icon shortcut" href="<?php echo base_url(); ?>images/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="<?php echo base_url(); ?>css/style.css" media="all" type="text/css" />
</head>
<body id="index">
<div class="contents">
<h1>Title here</h1>