Welcome Guest, Not a member yet? Register   Sign In
src images
#11

[eluser]ELRafael[/eluser]
Folder structure:

Code:
system/
  --application/
    --config/
      --config.php
    --controllers/
    --etc
    --views/
      --index_view.php
public/
  --css/
  --images/
    --your_image.jpg
  --js/
  --upload/

- Inside system/application/config/config.php try:
Code:
$config['base_url'] = 'http://www.example.com/'; //Use YOUR DOMAIN
- Inside system/application/views/index_view.php try this:
Code:
<html>
<head>
  <title>My Doubts about paths</title>
</head>
<body>
<img src="&lt;?php echo base_url(); ?&gt;public/images/your_image.jpg" height="NN" width="NN" alt="bla bla bla" />
&lt;/body&gt;
&lt;/html&gt;

You'll see this final result (HTML)
Code:
&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;My Doubts about paths&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
<img src="http://www.example.com/public/images/your_image.jpg" height="NN" width="NN" alt="bla bla bla" />
&lt;/body&gt;
&lt;/html&gt;

Of course, you'll need theese folder structure.

^.^


Messages In This Thread
src images - by El Forum - 09-07-2010, 11:24 PM
src images - by El Forum - 09-09-2010, 10:23 AM
src images - by El Forum - 09-10-2010, 04:36 PM
src images - by El Forum - 09-15-2010, 08:58 PM
src images - by El Forum - 09-15-2010, 09:32 PM
src images - by El Forum - 09-15-2010, 10:11 PM
src images - by El Forum - 09-16-2010, 12:38 AM
src images - by El Forum - 09-16-2010, 01:49 AM
src images - by El Forum - 09-16-2010, 10:11 AM
src images - by El Forum - 09-16-2010, 10:11 AM
src images - by El Forum - 09-16-2010, 11:00 AM
src images - by El Forum - 09-16-2010, 11:09 AM
src images - by El Forum - 09-16-2010, 01:51 PM
src images - by El Forum - 09-16-2010, 01:54 PM



Theme © iAndrew 2016 - Forum software by © MyBB