...

View Full Version : Help with external Html



Sharkhead
11-11-2011, 08:26 AM
I'm currently making a banner which has the nav bar on it. I made image from Photoshop and then I made different link space by image mapping. So I pasted that code on each and every page of my website. Now while doing that one thought came to my mind that, whenever I have to edit it I just can't go and edit each and every source code on each and every page. So the idea of using a external code and a single link in source code came in my mind. But I don't know how to do it. I googled and refereed to this http://www.javascriptkit.com/howto/ssi2.shtml
But something went wrong....
Will anyone help me in this?

Excavator
11-11-2011, 09:39 AM
Hello Sharkhead,
Maybe a better/different tutorial would help - http://www.tizag.com/phpT/include.php

Sharkhead
11-13-2011, 03:36 PM
I'm unable to understand it.
Would you explain it?

AsinNetworks
11-13-2011, 05:07 PM
Hello Sharkhead,
Maybe a better/different tutorial would help - http://www.tizag.com/phpT/include.php


As excavator said use a little PHP and you are done let me explain the example he has given



say you have two php files namely : one.php and two.php


in one.php you have written code


echo"hello";


and in two.php you have written

echo"how are you ? " ;



now in two.php before writing echo"how are you ? " ;


you have written include("one.php");
or
the full path of your file one.php (if it is hosted on another website or in different folder



then the output will be



Hello How are you ?


as it has included one.php executed the code in one.php and then shown the code written in two.php

Sharkhead
11-14-2011, 05:40 AM
So you mean I should upload the menu.php somewhere and get the link.
Then I should paste the link in the red area?

<?php include("menu.php"); ?>
<p>This is my home page that uses a common menu to save me time when I add
new pages to my website!</p>
</body>
</html>
And then paste the whole include.php in middle of my html code of the page? Right?

Sharkhead
03-13-2012, 08:59 AM
*BUMP*
Can you please tell?

abduraooft
03-13-2012, 09:20 AM
And then paste the whole include.php in middle of my html code of the page? Right?
Yes, but you probably(unless you configure your server) need to change the extension of your files from .htm/.html to .php, in order to execute the include() or any php statements.

Sharkhead
03-13-2012, 12:21 PM
Hello Sharkhead,
Maybe a better/different tutorial would help - http://www.tizag.com/phpT/include.php

Helped a lot.
Thanks...

Sharkhead
05-09-2012, 10:31 AM
Sorry for reopening/bumping,
Hey Excavator, that information of the link you gave works like a charm. But as I mentioned before, I need the external file to show the image directly. Right now its giving me the link towards the banner.
So instead of showing the banner image, its showing the link towards the image.
Any help on this?

Excavator
05-09-2012, 08:13 PM
Sorry for reopening/bumping,
Hey Excavator, that information of the link you gave works like a charm. But as I mentioned before, I need the external file to show the image directly. Right now its giving me the link towards the banner.
So instead of showing the banner image, its showing the link towards the image.
Any help on this?

Let's have a look at the most current version of your code. Even better, since there are images involved with your issue, a link to the test site.

Sharkhead
05-10-2012, 09:43 AM
Sorry, but I don't have a test site. All the files are on my computer itself and I'm working on like that. Any place where I could upload the .htm files and give you a link?

abduraooft
05-10-2012, 10:21 AM
Any place where I could upload the .htm files and give you a link?
http://www.maclife.com/article/howtos/how_host_your_website_dropbox



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum