Welcome Guest, Not a member yet? Register   Sign In
Base URL in Views
#1

[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">
&lt;html &gt;

&lt;head profile="http://gmpg.org/xfn/11"&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
    &lt;title&gt;MySite&lt;/title&gt;
    &lt;link rel="icon shortcut" href="images/favicon.ico" type="image/x-icon" /&gt;
    &lt;link rel="stylesheet" href="css/style.css" media="all" type="text/css" /&gt;
&lt;/head&gt;

&lt;body id="index"&gt;
<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:
&lt;?php echo base_url(); ?&gt;

But it didn't work, what am I doing wrong.

This is the code after editing (added &lt;?php echo base_url(); ?&gtWink:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
&lt;html &gt;

&lt;head profile="http://gmpg.org/xfn/11"&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
    &lt;title&gt;MySite&lt;/title&gt;
    &lt;link rel="icon shortcut" href="&lt;?php echo base_url(); ?&gt;images/favicon.ico" type="image/x-icon" /&gt;
    &lt;link rel="stylesheet" href="&lt;?php echo base_url(); ?&gt;css/style.css" media="all" type="text/css" /&gt;
&lt;/head&gt;

&lt;body id="index"&gt;
<div class="contents">
        <h1>Title here</h1>


Messages In This Thread
Base URL in Views - by El Forum - 11-11-2009, 06:32 AM
Base URL in Views - by El Forum - 11-11-2009, 06:35 AM
Base URL in Views - by El Forum - 11-11-2009, 08:11 AM



Theme © iAndrew 2016 - Forum software by © MyBB