Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8
|
BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8
This is the forum to discuss the Wrox book Professional CodeIgniter by Thomas Myer; ISBN: 9780470282458
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 29th, 2010, 04:26 PM
Registered User
 
Join Date: Jan 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Question Problem with Images Displaying for Specific Views

Hello;

I am brand new to the CI framework and have just received the Professional CodeIgniter textbook. I started following the steps in the book with setup and configuration, etc.
I reached chapter 4 (page 86) where we create the home page view. The code is displaying the images with a statement like:
Code:
echo "<img src='".$mainf['image']."' border='0' align='left'/>\n";
which works for me although I do not see how the src finds the image in the images directory but it does.
When I reached the part about creating the category view (page 96), as well as the product view (page 100), and search view (page 103), it uses the same type of convention to display the images respectively like:
Code:
echo "<img src='".$list['thumbnail']."' border='0' align='left'/>\n";
echo "<img src='".$product['image']."' border='0' align='left'/>\n";
echo "<img src='".$list['thumbnail']."' border='0' align='left'/>\n";
echo "<img src='".$list['thumbnail']."' border='0' align='left'/>\n";
which does not work unless I put the base_url before the image name like:
Code:
echo "<img src='".base_url().$list['thumbnail']."' border='0' align='left'/>\n";
which makes sense to me that you need the path. I tried to look back at all configuration information in chapter 3 but don't see why the previous code statements work without the base_url.
Could someone please clue me in on this? Thanks for any help.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Views not displaying correctly deanf7 BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8 3 March 16th, 2009 09:53 AM
Problem displaying images silvia23 BOOK: Beginning XML, 4th Ed ISBN: 978-0-470-11487-2 4 January 28th, 2009 09:26 AM
strange problem with displaying LOB images in JSP BuryBear Pro JSP 1 April 23rd, 2006 03:48 AM
Displaying a specific record on a webpage sswingle Classic ASP Basics 8 March 20th, 2006 12:30 AM
Displaying options specific to the admin Smack715 Classic ASP Basics 11 June 23rd, 2004 08:33 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.