Wrox Programmer Forums
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Dreamweaver (all versions) 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 April 14th, 2006, 08:54 AM
Authorized User
 
Join Date: Apr 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar,

Its working!! :-)) You were right, the path stored in the databse should be //localhost/wwwroot/Barlows/Images/1.jpg and then it works perfectly! I owe you a beer man!

I've now got another question, but I'll put that as a new post as it's nothing to do with this topic.

Thanks again Imar!

Mike

 
Old April 14th, 2006, 11:24 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Before you send me that beer, you may want to consider the path you store in the database.

If you store something like /localhost in the database, on your machine things will work. However, this schema will break when you move your site to another machine and access it like http://www.yourdomain.com. In that case, localhost will no longer exist so your images will break.

That's why I suggested earlier to store images from the virtual root path.

So, if you browse to your site like this:

http://localhost/

and you access an image like this:

http://localhost/Images/MyImage.gif

then only store /Images/MyImage in the database. Once you move to YourDomain.com, you can still access the image with

http://www.yourdomain.com/Images/MyImage.gif where the italic part is the dynamic path from the database.

Hope this helps,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
 
Old April 17th, 2006, 12:33 AM
Authorized User
 
Join Date: Apr 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Imar, that's usefull to know!






Similar Threads
Thread Thread Starter Forum Replies Last Post
Serializing photos/files to a database w/ MySQL ironchef Pro JSP 1 December 19th, 2007 11:28 PM
How to add 5 more photos js32821 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 5 September 3rd, 2007 12:48 PM
Ridiculus photos shapira BOOK: Professional Crystal Reports for VS.NET 0 March 7th, 2005 08:11 PM
Uploading Photos microchip Classic ASP Basics 6 April 25th, 2004 10:15 AM
Photos in access kev_79 Access 1 July 24th, 2003 02:24 PM





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