Author Topic: img displaying problem  (Read 1189 times)

0 Members and 1 Guest are viewing this topic.

Offline hamzaTopic starter

  • Enthusiast
  • Posts: 299
    • View Profile
img displaying problem
« on: October 26, 2008, 05:19:26 PM »
Not able to display the image by using helper(‘html’).
code is below.


<?php

  echo img(‘basic registeration system/images/img.jpg’,TRUE);
  echo img(‘basic registeration system/images/img.jpg’,FALSE);
?>
basic registeration system is a folder in view folder like path
view/basic registeration system/images/img.jpg

not able to load the image
what is problem any idea

Offline corbin

  • Guru
  • Freak!
  • *
  • Posts: 7,951
  • Gender: Male
    • View Profile
Re: img displaying problem
« Reply #1 on: October 26, 2008, 05:54:26 PM »
We have no idea what the img() function is.
Why doesn't anyone ever say hi, hey, or whad up world?

Offline hamzaTopic starter

  • Enthusiast
  • Posts: 299
    • View Profile
Re: img displaying problem
« Reply #2 on: October 26, 2008, 06:05:36 PM »
img() function will create imag tag of html
if you use this function then output will me a
image tag like this
<img src=' path '  />

Offline corbin

  • Guru
  • Freak!
  • *
  • Posts: 7,951
  • Gender: Male
    • View Profile
Re: img displaying problem
« Reply #3 on: October 26, 2008, 07:28:44 PM »
Is everything being printed out correctly?
Why doesn't anyone ever say hi, hey, or whad up world?

Offline hamzaTopic starter

  • Enthusiast
  • Posts: 299
    • View Profile
Re: img displaying problem
« Reply #4 on: November 01, 2008, 04:37:49 PM »
what you are saying man corbin
have you every use codeigneter framework
i am working in it and have a problem of
not displaying image??

Offline corbin

  • Guru
  • Freak!
  • *
  • Posts: 7,951
  • Gender: Male
    • View Profile
Re: img displaying problem
« Reply #5 on: November 01, 2008, 04:56:51 PM »
No I have not used it.  If you expected me to know you were using CI, why would I have done so?  You never mentioned it, and I wouldn't be familiar with the function names.



It seems to me like we need more code to see what your problem is.
Why doesn't anyone ever say hi, hey, or whad up world?

Offline wildteen88

  • Guru
  • 'Insane!'
  • *
  • Posts: 12,021
  • Gender: Male
    • View Profile
Re: img displaying problem
« Reply #6 on: November 01, 2008, 06:17:53 PM »
Not able to display the image by using helper(‘html’).
code is below.


<?php

  echo img(‘basic registeration system/images/img.jpg’,TRUE);
  echo img(‘basic registeration system/images/img.jpg’,FALSE);
?>
basic registeration system is a folder in view folder like path
view/basic registeration system/images/img.jpg

not able to load the image
what is problem any idea
the img function does not load your images from your views/ folder. Instead it loads your images from your sites root, eg
echo img('basic registeration system/images/img.jpg',TRUE);

will output the following HTML
Code: [Select]
<img src="http://yoursite.com/basic registeration system/images/img.jpg">
You should place all your images outside of your application/ folder, as shown here

Offline hamzaTopic starter

  • Enthusiast
  • Posts: 299
    • View Profile
Re: img displaying problem
« Reply #7 on: November 21, 2008, 01:11:10 PM »
Thank you so much for all the help.
-=====================
i know now where should i place all
my assets but dont no the actual
reason of putting all the folders outside
 the system folder.
------