thewindmaker Posted June 8, 2006 Share Posted June 8, 2006 Hi,If I have made say a map or photoshop wallpaper for my site and I want it to have the adress such as. justzelda.zeldacentral.net/triforceanimation.gif . is all the i have to do is save the file to the CGI folder in my ftp program. then use this coding? <img src="justzelda.zeldacentral.net/triforceanimation.gif"> cause its not working for me... do i have to make it a directory or something?The image isn't showing up its just a box with a red x through it.or should it be this coding? <img src="triforceanimation.gif"> Thanks Link to comment Share on other sites More sharing options...
Little Goat Posted June 8, 2006 Share Posted June 8, 2006 both of those codes should work, unless you are using XHTML.hen the image tag would be <img ... /> Link to comment Share on other sites More sharing options...
thewindmaker Posted June 8, 2006 Author Share Posted June 8, 2006 yeah it just shows up as a red x inside a box.it does have my url adress in it though so could it be the picture? Link to comment Share on other sites More sharing options...
Little Goat Posted June 8, 2006 Share Posted June 8, 2006 well, aparently the image isn't where you thought it was. maybe try uploading again, or figure out where it actually is. Link to comment Share on other sites More sharing options...
thewindmaker Posted June 8, 2006 Author Share Posted June 8, 2006 no i see the image i mean its clearly on the top let of the page and when you go to check the url adress its the correct one.. does it have to be in the same folder in the ftp for it to work? cause its not. Link to comment Share on other sites More sharing options...
Little Goat Posted June 8, 2006 Share Posted June 8, 2006 so you're saying it already works, but it isn't in the same folder? Link to comment Share on other sites More sharing options...
thewindmaker Posted June 8, 2006 Author Share Posted June 8, 2006 I tried both ways. With the picture file in the same folder. then one in a different folder. or directory/thing.you can see it at the site if u want Top left corner with the box with red x in it Link to comment Share on other sites More sharing options...
Little Goat Posted June 8, 2006 Share Posted June 8, 2006 yes, it would need to be in the same folder, or you need to put the whole location in the src attribute. Link to comment Share on other sites More sharing options...
thewindmaker Posted June 8, 2006 Author Share Posted June 8, 2006 hmm k yup still not working.. not sure whats wrong now. but thanks for trying. Link to comment Share on other sites More sharing options...
Little Goat Posted June 8, 2006 Share Posted June 8, 2006 where is the image located? Link to comment Share on other sites More sharing options...
thewindmaker Posted June 8, 2006 Author Share Posted June 8, 2006 In a different folder than that of the main page... like a different directory in the ftp server. Link to comment Share on other sites More sharing options...
Little Goat Posted June 8, 2006 Share Posted June 8, 2006 can you give a link? Link to comment Share on other sites More sharing options...
reportingsjr Posted June 8, 2006 Share Posted June 8, 2006 He means.. he put the image in the cgi folder (way wrong folder buddy, its for active scripts like a login page ) and when he tried to put it in an image tag it wont show up.. try it with the /cgi directory in it Link to comment Share on other sites More sharing options...
Little Goat Posted June 8, 2006 Share Posted June 8, 2006 ok. I'm really not that familiar with web hosts or FTP so maybe I should just fade out of this discussion... Link to comment Share on other sites More sharing options...
thewindmaker Posted June 8, 2006 Author Share Posted June 8, 2006 alright thanks ill try that.also thanks goat for trying! Link to comment Share on other sites More sharing options...
thewindmaker Posted June 8, 2006 Author Share Posted June 8, 2006 k were do i put the /cgi-cin? like this? <img src="justzeldalogo.jpg/cgi-bin"> cause that aint working either! iam so confused! Link to comment Share on other sites More sharing options...
Little Goat Posted June 8, 2006 Share Posted June 8, 2006 no, you would just put cgi-bin/justzeldalogo.jpg i fI understand you correctly. Link to comment Share on other sites More sharing options...
justsomeguy Posted June 8, 2006 Share Posted June 8, 2006 Why are you uploading images to the cgi-bin directory anyway? That's not what that directory is for. Just make an 'images' directory or something like that, and put it there. The problem is your path, I don't know how to teach someone how directory paths work, I think it would be pretty obvious. If you have a folder called images in the root directory of your web space, then you can point to your images by justzelda.zeldacentral.net/images/image.jpg or whatever. And keep in mind that if you are specifying the domain name in the path, you need the protocol also (http://). If you leave that out, the browser will look for something like this: http://justzelda.zeldacentral.net/justzeld...mages/image.jpgBut if it is a relative path, then you don't need that. If you are pointing a file in the root to the image, all you need is this:images/image.jpgor/images/image.jpgRight now the image on your page has this address:http://justzelda.zeldacentral.net/justzeldalogo.jpg/cgi-binand that doesn't even refer to an image, it refers to a directory called cgi-bin inside a directory called justzeldalogo.jpg inside the root directory. Link to comment Share on other sites More sharing options...
thewindmaker Posted June 9, 2006 Author Share Posted June 9, 2006 alright... so i have the picture in the same directory/folder thing. so this is what the coding should be right? <img src="AffilatesMenu.TIF">or<img src="images/affiliatesmenu.tif">or <img src="/images/image.affilatesmenu.tif"> Thanks! Link to comment Share on other sites More sharing options...
Little Goat Posted June 9, 2006 Share Posted June 9, 2006 the first one is correct if it is in the same directory. Link to comment Share on other sites More sharing options...
justsomeguy Posted June 9, 2006 Share Posted June 9, 2006 You really need to get a good handle on directories and paths if you are going to be doing web development. Take this for example:images/affiliatesmenu.tifThis looks for a file called affiliatesmenu.tif in a folder called images that is in the same folder as the file that references it. So if you have this file: http://mysite.com/pages/somepage.htmlThe file somepage.html is in a folder called "pages", which in turn is in the root folder of the mysite.com domain. If that page has this code on it:<img src="images/image.jpg">That means that it is referencing a file called image.jpg inside the images folder, and since there is nothing before "images", that means that the images folder is in the same folder as the HTML file (the pages folder). So it is looking for this image:http://mysite.com/pages/images/image.jpgSo, assume you just have this:<img src="image.jpg">That is looking in the same folder as the page that refers to it. So, using the same example HTML page, it would be looking for this file:http://mysite.com/pages/image.jpgIf you want to look above the folder you are currently in (you are in mysite.com/pages, and you want to look in mysite.com/) you use this:<img src="../image.jpg">The parent directory qualifier (../) looks in the parent directory (one level up). You can stack them. This:<img src="../../../image.jpg">looks 3 levels up from the current page.All of these examples are called relative paths, they look in a path that is relative to the current page. You can also use an absolute path:<img src="http://mysite.com/pages/images/image.jpg">This will always look in the same place, no matter where the page is that refers to it.Or, you can just refer to the root of the server itself like this:<img src="/images/image.jpg">That slash before the "images" folder tells it to start at the root. So that is equivalent to this:<img src="http://mysite.com/images/image.jpg">Since mysite.com is the root, it starts there and looks in a folder called images.Also, as a side note never, ever use a TIFF image as a web image. TIFF images are uncompressed, and are typically pretty massive in size. If you have a TIFF image that is a 24-bit image, meaning that there are 8 bits each for red, green, and blue for each pixel, and assuming that the image is only 100x100 pixels (for 10,000 pixels total), that means that the uncompressed file size of that image is 240Kb (24 * 10,000). That is an enormous size for 100x100. A banner that is 800x100 would be almost 2Mb. JPG, GIF, PNG, and any other sane format uses compression. Do not use BMP either, BMP files are also uncompressed. Link to comment Share on other sites More sharing options...
thewindmaker Posted June 9, 2006 Author Share Posted June 9, 2006 K well, either I am a complete idiot or I am doing some thing very wrong... Here is picture to help show what iam doing exactly. This picture is showing the main folder/directory that opens up when you open the ftp server.This is a picture of what it looks like when you open up the Image folder that you saw in the first picture. I am trying to have the file justzeldalogo.jpg inside the file index.php. With having to use a image uploader like imageshack or photobukcet.Here is a picture of what it looks like on the site. with these codings. <img src="../images/justzeldalogo.jpg"><img src="/pages/images/justzeldalogo.jpg"><img src="justzeldalogo.jpg"><img src="/images/justzeldalogo.jpg"> Link to comment Share on other sites More sharing options...
scott100 Posted June 9, 2006 Share Posted June 9, 2006 Put this in index.php <img src="Images/JustzeldaLogo.jpg" /> From what i make out that should be correct. Link to comment Share on other sites More sharing options...
justsomeguy Posted June 10, 2006 Share Posted June 10, 2006 That will work, and so will the fourth one you posted above. But I would be willing to bet that your server is running Linux, and Linux is case-sensitive. Images and images are not the same folder. JustzeldaLogo.jpg is not the same as justzeldalogo.jpg. You need to be consistent, you probably just want to keep all filenames lowercase, it makes it easy. Link to comment Share on other sites More sharing options...
thewindmaker Posted June 11, 2006 Author Share Posted June 11, 2006 omg! it works!!!THank you guys so much you have just saved me so much time!! I have spent hours trying to fgure this out tbut you have done it! Thanks sooooooooo much!! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now