hamza Posted October 26, 2008 Share Posted October 26, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/130191-img-displaying-problem/ Share on other sites More sharing options...
corbin Posted October 26, 2008 Share Posted October 26, 2008 We have no idea what the img() function is. Quote Link to comment https://forums.phpfreaks.com/topic/130191-img-displaying-problem/#findComment-675186 Share on other sites More sharing options...
hamza Posted October 26, 2008 Author Share Posted October 26, 2008 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 ' /> Quote Link to comment https://forums.phpfreaks.com/topic/130191-img-displaying-problem/#findComment-675194 Share on other sites More sharing options...
corbin Posted October 26, 2008 Share Posted October 26, 2008 Is everything being printed out correctly? Quote Link to comment https://forums.phpfreaks.com/topic/130191-img-displaying-problem/#findComment-675253 Share on other sites More sharing options...
hamza Posted November 1, 2008 Author Share Posted November 1, 2008 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?? Quote Link to comment https://forums.phpfreaks.com/topic/130191-img-displaying-problem/#findComment-680162 Share on other sites More sharing options...
corbin Posted November 1, 2008 Share Posted November 1, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/130191-img-displaying-problem/#findComment-680184 Share on other sites More sharing options...
wildteen88 Posted November 1, 2008 Share Posted November 1, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/130191-img-displaying-problem/#findComment-680239 Share on other sites More sharing options...
hamza Posted November 21, 2008 Author Share Posted November 21, 2008 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. ------ Quote Link to comment https://forums.phpfreaks.com/topic/130191-img-displaying-problem/#findComment-695581 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.