- This topic is empty.
-
AuthorPosts
-
March 20, 2011 at 4:24 pm #32073sattu94Member
Hello
I recently was trying to execute this piece of code:It worked as expected then.
I then moved the image to D:kkdata.But it doesn’t work here.
Just to make sure i created another folder with a hyphen in it’s name and moved the file to it:March 20, 2011 at 4:27 pm #55020cybershotParticipantso what is your question? if hyphens don’t work, don’t use them in the folder name
March 20, 2011 at 4:30 pm #55024sattu94Memberwhy don’t they work?
it’s not consistent ..i should not have to change all of my folder structure. due to this
If it is of any help this is the original snippet i am executing:March 20, 2011 at 4:34 pm #55081mixxmacMemberYou need to use a proper URL. Either an absolute URL (e.g. ‘http://www.mywebsite.com/tux-water.jpg’), or a relative URL (e.g. ‘tux-water.jpg’). Don’t reference the file path (e.g. ‘D:mywebsitetux-water.jpg’).
March 20, 2011 at 4:36 pm #55082sattu94Memberwhat if the file doesnt exist on the internet, what if it’s local ?
Thanks for the answers.March 20, 2011 at 4:42 pm #55088mixxmacMemberI guess you’d have to use a relative URL then (e.g. ‘tux-water.jpg’). Or, assuming you’re running a webserver (e.g. IIS on Windows), you should be able to browse to it using ‘localhost’ as the domain (e.g. ‘http://localhost/tux-water.jpg’). However, it’s best to use relative URLs, so I would stick with ‘tux-water.jpg’.
March 20, 2011 at 5:24 pm #55089chrisburtonParticipantIt is most likely because of where your image file is located. Remove the D: drive from the URL as that is not proper. Also, how are you working locally, as in what does your setup look like?
AuthorPostsViewing 7 posts - 1 through 7 (of 7 total)- The forum ‘CSS’ is closed to new topics and replies.