ilikephp Posted April 17, 2008 Share Posted April 17, 2008 Hello!! Please is there a way to insert pictures in dreamweaver other than this: <img src="header/header_01.jpg" width="850" height="83"> My problem is: when I put the header.php files inside a folder, the header section in my website will not be displayed. I think from the above code :S Can u help me plzz!! Quote Link to comment Share on other sites More sharing options...
Zhadus Posted April 17, 2008 Share Posted April 17, 2008 Try <img src=\"header/header_01.jpg\" width=\"850\" height=\"83\"> If that doesn't work, post code for your header.php please. Quote Link to comment Share on other sites More sharing options...
ilikephp Posted April 17, 2008 Author Share Posted April 17, 2008 header.php (it is inside the folder: arabic/MainPage/PHP_Files/) and the index.php is inside the root folder. header_01.jpg and header_02.jpg are inside: arabic/MainPage/PHP_Files/header/ <body> <table width="850" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="83"><img src="header/header_01.jpg" width="850" height="83"></td> </tr> <tr> <td height="86"><img src="header/header_02.jpg" width="850" height="83"> </td> </tr> </table> </body> Quote Link to comment Share on other sites More sharing options...
Zhadus Posted April 17, 2008 Share Posted April 17, 2008 Are they being loaded from the index.php or from the header.php? Quote Link to comment Share on other sites More sharing options...
ilikephp Posted April 17, 2008 Author Share Posted April 17, 2008 from the index Quote Link to comment Share on other sites More sharing options...
Zhadus Posted April 17, 2008 Share Posted April 17, 2008 This is really going to be an HTML issue, but try this: <img src=\"arabic/MainPage/PHP_Files/header/header_01.jpg\" width=\"850\" height=\"83\"> Quote Link to comment Share on other sites More sharing options...
ilikephp Posted April 17, 2008 Author Share Posted April 17, 2008 I put it as u told me: so instead of getting an error picture, I am receiving empty space instead of the picture. Quote Link to comment Share on other sites More sharing options...
Zhadus Posted April 17, 2008 Share Posted April 17, 2008 Change it back to how you had it, and tell me what it says in the source code for when you get the error picture. Quote Link to comment Share on other sites More sharing options...
ilikephp Posted April 17, 2008 Author Share Posted April 17, 2008 header.php <body> <table width="850" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="83"><img src="header/header_01.jpg"></td> </tr> <tr> <td height="86"><img src="header/header_02.jpg" width="850" height="86"></td> </tr> </table> </body> so I receive an error picture Quote Link to comment Share on other sites More sharing options...
Zhadus Posted April 17, 2008 Share Posted April 17, 2008 I meant view the source for when that is in your browser. Or right click on the error picture and post the address that's in the properties. Quote Link to comment Share on other sites More sharing options...
ilikephp Posted April 17, 2008 Author Share Posted April 17, 2008 http://www.mywebsite.org/header/header_02.jpg Quote Link to comment Share on other sites More sharing options...
Zhadus Posted April 17, 2008 Share Posted April 17, 2008 Ok, then I want you to put in the full path the arabic/MainPage/PHP_Files/header/header_01.jpg as your img src and post the img src line from view source on the browser page when you get the page that doesn't display any image. Quote Link to comment Share on other sites More sharing options...
ilikephp Posted April 17, 2008 Author Share Posted April 17, 2008 www.mywebsite.org/arabic/MainPage/PHP_Files/header/header_01.jpg I received the picture That's want you want me to do? Quote Link to comment Share on other sites More sharing options...
Zhadus Posted April 17, 2008 Share Posted April 17, 2008 It displayed Ok correct? Because you are loading it from index, you need to put the full directory from the folder that the index file is in (In this case the root). Quote Link to comment Share on other sites More sharing options...
craygo Posted April 17, 2008 Share Posted April 17, 2008 you don't have to do your domain, just the path from where index is located as Zhadus stated <td height="86"><img src="arabic/MainPage/PHP_Files/header/header_02.jpg" width="850" height="86"></td> Ray Quote Link to comment Share on other sites More sharing options...
ilikephp Posted April 17, 2008 Author Share Posted April 17, 2008 I AM VERY SORRY, coz I did not understand well :S can u plz give me more explanation? I am really sorry :S:S this is inside the index.php: <tr> <td height="169" colspan="3" align="center" valign="bottom"><?PHP include "arabic/MainPage/PHP_Files/header.php"; ?></td> </tr> Quote Link to comment Share on other sites More sharing options...
Zhadus Posted April 17, 2008 Share Posted April 17, 2008 Even though the img src is in the header.php file, when you use the include, it's loading the information verbatim in the index.php file. Therefore, you need the path from index.php to the image in order to load the image instead of what you originally had, which was the path from header.php to the image. e.g. www.site.com/index.php "image/img.gif" -> www.site.com/image/img.gif www.site.com/header/header.php "image/img.gif" -> www.site.com/header/image/img.gif BUT when you have header.php inside of index.php you see www.site.com/index.php "image/img.gif" -> www.site.com/image/img.gif "header/image/img.gif" -> www.site.com/header/image/img.gif Quote Link to comment Share on other sites More sharing options...
ilikephp Posted April 17, 2008 Author Share Posted April 17, 2008 Thx for the explanation I put this code inside my header.php that is inside the folder: arabic/MainPage/PHP_Files/ <td height="86"><img src="arabic/MainPage/PHP_Files/header/header_02.jpg" width="850" height="86"></td> but still have the error image Quote Link to comment Share on other sites More sharing options...
Zhadus Posted April 17, 2008 Share Posted April 17, 2008 If you right click on the error image and get the address, what does it say that way? Quote Link to comment Share on other sites More sharing options...
ilikephp Posted April 17, 2008 Author Share Posted April 17, 2008 when I right click on the image that is not opening I have: http://www.sitename.org/header/header_02.jpg Quote Link to comment Share on other sites More sharing options...
Zhadus Posted April 17, 2008 Share Posted April 17, 2008 Did you make sure to save your changes on the header file? Quote Link to comment Share on other sites More sharing options...
ilikephp Posted April 17, 2008 Author Share Posted April 17, 2008 yeah I am sure, but notice: when I right click on the image that is not opening I have: http://www.sitename.org/header/header_02.jpg the link underlined is not in the correct place! it is inside arabic/MainPage/PHP_Files/header/ Quote Link to comment Share on other sites More sharing options...
Zhadus Posted April 17, 2008 Share Posted April 17, 2008 Correct, and it should not be, and that is not what you have entered. Make sure your web host is refreshed and your browser isn't opening old data. Quote Link to comment Share on other sites More sharing options...
ilikephp Posted April 17, 2008 Author Share Posted April 17, 2008 Thanks a lot, it is working now!! But now in my dreamweaver I can no longer see the pictures inside the tables or cells, why? because it is ftp? if yes, what can I do do see them? THankssss Quote Link to comment Share on other sites More sharing options...
Zhadus Posted April 17, 2008 Share Posted April 17, 2008 Try using the absolute path for the images. http://www.sitedomain.org/arabic/MainPage/PHP_Files/header/header_02.jpg I think that would work in both. Quote Link to comment 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.