[eluser]johnnyForums[/eluser]
[quote author="johnnyForums" date="1248395695"]I am trying to use the html helper:
Code:
<?php echo img('inc/unembellished/images/img03.jpg');?>
But it will not load. I get the http://.... but the image never loads. The following footer loads so I know it can see that folder:
Code:
<?php $this->load->view('inc/unembellished/footer.php')?>
I also tried moving the image to the same level as the footer that is found:
Code:
<?php echo img('inc/unembellished/img03.jpg');?>
I don't know how to load the image. Footer is loaded but the image it not. Thank you for any help.
Here is the full code:
Code:
<?php $this->load->view('inc/unembellished/header.php')?>
<div id="wrapper">
<!-- start header -->
<div id="header">
<div id="logo">
<h1><a href="#">MyTest 2009</a></h1>
<h2> Design by Free Css Templates</h2>
</div>
<div id="menu">
<ul>
<li class="current_page_item"><a href="#">Homepage</a></li>
<li><a href="#">Blogs</a><img src='<?php echo base_url() . "inc/unembellished/img03.jpg;?>"' /></li>
<li><a href="#">Photos</a></li>
<li><a href="#">About</a></li>
<li class="last"><a href="#">Contact</a></li>
</ul>
</div>
</div>
<!-- end page -->
</div>
<?php $this->load->view('inc/unembellished/footer.php')?>
Header and footer load but not any images in the header or footer or here above.[/quote]
I ended up getting it with:
<?php echo base_url() . 'inc/unembellished/'?>
<?php echo link_tag('inc/unembellished/default.css');?>
background: #FFFFFF url( <?php echo base_url() . 'inc/unembellished/'?>images/img01.jpg) repeat-x left top;
and so on. But, to make this work I had to move in "inc" folder outside of my codeigniter
system directory
I have:
/library/documents/myCIfolder
---inc
---system
----application
----and so on
---user_guide
so it was relative to my virtual directory set up on my httpd.conf.