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!! Link to comment https://forums.phpfreaks.com/topic/101570-solved-change-quotimage-source-quot/ 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. Link to comment https://forums.phpfreaks.com/topic/101570-solved-change-quotimage-source-quot/#findComment-519522 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> Link to comment https://forums.phpfreaks.com/topic/101570-solved-change-quotimage-source-quot/#findComment-519540 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? Link to comment https://forums.phpfreaks.com/topic/101570-solved-change-quotimage-source-quot/#findComment-519572 Share on other sites More sharing options...
ilikephp Posted April 17, 2008 Author Share Posted April 17, 2008 from the index Link to comment https://forums.phpfreaks.com/topic/101570-solved-change-quotimage-source-quot/#findComment-519587 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\"> Link to comment https://forums.phpfreaks.com/topic/101570-solved-change-quotimage-source-quot/#findComment-519600 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. Link to comment https://forums.phpfreaks.com/topic/101570-solved-change-quotimage-source-quot/#findComment-519647 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. Link to comment https://forums.phpfreaks.com/topic/101570-solved-change-quotimage-source-quot/#findComment-519665 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 Link to comment https://forums.phpfreaks.com/topic/101570-solved-change-quotimage-source-quot/#findComment-519673 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. Link to comment https://forums.phpfreaks.com/topic/101570-solved-change-quotimage-source-quot/#findComment-519679 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 Link to comment https://forums.phpfreaks.com/topic/101570-solved-change-quotimage-source-quot/#findComment-519684 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. Link to comment https://forums.phpfreaks.com/topic/101570-solved-change-quotimage-source-quot/#findComment-519696 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? Link to comment https://forums.phpfreaks.com/topic/101570-solved-change-quotimage-source-quot/#findComment-519698 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). Link to comment https://forums.phpfreaks.com/topic/101570-solved-change-quotimage-source-quot/#findComment-519723 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 Link to comment https://forums.phpfreaks.com/topic/101570-solved-change-quotimage-source-quot/#findComment-519728 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> Link to comment https://forums.phpfreaks.com/topic/101570-solved-change-quotimage-source-quot/#findComment-519762 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 Link to comment https://forums.phpfreaks.com/topic/101570-solved-change-quotimage-source-quot/#findComment-519773 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 Link to comment https://forums.phpfreaks.com/topic/101570-solved-change-quotimage-source-quot/#findComment-519800 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? Link to comment https://forums.phpfreaks.com/topic/101570-solved-change-quotimage-source-quot/#findComment-519802 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 Link to comment https://forums.phpfreaks.com/topic/101570-solved-change-quotimage-source-quot/#findComment-519812 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? Link to comment https://forums.phpfreaks.com/topic/101570-solved-change-quotimage-source-quot/#findComment-519813 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/ Link to comment https://forums.phpfreaks.com/topic/101570-solved-change-quotimage-source-quot/#findComment-519839 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. Link to comment https://forums.phpfreaks.com/topic/101570-solved-change-quotimage-source-quot/#findComment-519858 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 Link to comment https://forums.phpfreaks.com/topic/101570-solved-change-quotimage-source-quot/#findComment-519938 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. Link to comment https://forums.phpfreaks.com/topic/101570-solved-change-quotimage-source-quot/#findComment-519940 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.