Jump to content


External Links


2 replies to this topic

#1 Shock

    Young Padawan

  • Members
  • Pip
  • 19 posts

Posted 16 October 2005 - 08:10 PM

Ok, I'm having a ridiculously tough time with this. I want a way to be able to store my website's links in an external file so that I can just "read" the file from the website to display the links, and incase I ever want to change a link I don't have to edit all of my pages.

I'm not exactly new to HTML, but outside of the basics I just get confused. I was looking up XML and trying to read the tutorials, but I couldn't even get the most simple of them to work. :P Not really sure if I want to go into frames either. Can anyone recommend another way to do this? Or maybe even an XML tutorial that a 5 year old can do?

#2 Quimp

    Young Padawan

  • Members
  • Pip
  • 18 posts

Posted 16 October 2005 - 08:26 PM

If your web host allows you to use PHP, it's as simple as changing your file's extention to .php and adding the following:

<?php
include("links.txt");
?>


Helpful XML tutorial: http://codewalkers.c...rials/50/1.html - *hint* directly found in Pixel2Life's great archive by searching for "XML" *hint*.

Edited by Quimp, 16 October 2005 - 08:26 PM.


#3 Shock

    Young Padawan

  • Members
  • Pip
  • 19 posts

Posted 16 October 2005 - 08:27 PM

Argh... I searched for "External Links" I should have thought of XML. Thanks for the advice though I'll give the PHP function a try first and see how it goes.

EDIT: Yes that works just as I wanted... I must really be out-of-it tonight... it took 5 minutes before I realized it wasn't working because I hadn't renamed it .php.

Edited by Shock, 16 October 2005 - 08:45 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users