Jump to content

img displaying problem


hamza

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/130191-img-displaying-problem/
Share on other sites

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

<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

  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.