Results 1 to 4 of 4

Thread: Importing txt into a marquee

  1. #1
    Join Date
    May 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Importing txt into a marquee

    Hi, I really need some help!
    First off I have nottraining in any sort of programming and am attempting to teach myself using sites such as this and so far doing an okay job. (thanks) I am designing an intranet for my school and have got a marquee news banner on the first page. Problem is I want other people to update the news without going into the script. I've designed the page in html using divs. Is there any (easy) way of importing text from an external txt file into the news feed?
    Hope you can help - Philippa x

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    The answer to your question is, No, there is no way easy of doing this. You'll need PHP, and perhaps MySQL.
    Jeremy | jfein.net

  3. #3
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Well, you could probably use SSI (server side includes), but I'm not 100% on that.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  4. #4
    Join Date
    Nov 2006
    Location
    Northeast USA
    Posts
    408
    Thanks
    8
    Thanked 30 Times in 28 Posts

    Default

    Actually, php is your best bet,
    PHP Code:
    <!--html code here-->
    <?php
    $handle 
    fopen("news.txt""rb");
    $contents stream_get_contents($handle);
    fclose($handle);
    ?>
    <!--more html code here-->
    <marquee><?php echo $contents?></marquee>
    <!-- more html code here-->
    Now just edit news.txt, and there you go...
    P.S. change you filename to index.php
    -Ben -- THE DYNAMIC DRIVERS
    My Links: My DD Profile||My Youtube Video Tutorials||DD Helping Coders||DD Coders In Training
    I told my client to press F5, the client pressed F, then 5, *facepalm*

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •