Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Apr 2006
    Posts
    5
    Member #
    13007
    I am looking for a simple way in which i can up date my site from work, who are a bit funny about installing a non company owned software such as dreamweaver etc.
    Hence I would like to be able to update my site by uploading a simple text file containing text and the browser to access this file and insert the relavent pieces of text into the relavent pages html. Firstly is this possible and is there a better way of doing it. I am looking to automate as much as possible as my boss might be watching!
    Is it also possible to put in a link in page i want to display but showing the first line of txt file, then another link which takes the second line and so on.
    whats teh best way to approach this?
    Any help would be much appreciated.

  2.  

  3. #2
    Senior Member audiofreak9's Avatar
    Join Date
    Apr 2005
    Location
    NJ
    Posts
    339
    Member #
    9584
    Welcome to WDF, crazyivan try looking into shmtl, (html includes) see this example from a previous wdf forum topicand this topic also.

  4. #3
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,694
    Member #
    5580
    Liked
    717 times
    Ivan ...

    Is it possible for you to change the extension of your pages
    from .html to .php? such as "index.php"?

    Using PHP, which is the same as using SSI (server side includes) allows
    you to not only insert text files in your page, but process the displayed
    text at the same time (as in displaying only 1 line for each text file).

    PHP is a server-side scripting language, so you'll need to make sure
    the webhost (or your server) can use PHP, and then get help to figure
    out how to make it work.

    If you can change the extension to .php and you are allowed to use PHP,
    let us know and give us a link to your web page and your text file.

    I can help you with the PHP portion.


  5. #4
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,694
    Member #
    5580
    Liked
    717 times
    Ivan ...

    Also elaborate on your site ...

    Maybe you want to make it a whole CMS (content management system) thing.

    A pre-exiting PHP script that allows you to log-in, change any of the content
    from any PC on the internet. In this case, you'd need a PHP/MySQL script ...
    doing a search on Google for: PHP content management script


  6. #5
    Junior Member
    Join Date
    Apr 2006
    Posts
    5
    Member #
    13007
    hi thanks for getting back to me so quick, that has helped but am unable to test at moment fully. Is it is possible to referance specific sections of the included file. For example I want to be able to update the title on each page so that fine in principle, but also on one page only i want to change and insert a few numbers at different locations within the page. Can i do this using tags? or will that fall down?
    for example section two of include file and put a pointer to that section
    section 3 of include file to be shown in another area of the page and so on.
    is this possible or very complicated to do without using three or as many files as items i need to update files?
    cheers

  7. #6
    Junior Member
    Join Date
    Apr 2006
    Posts
    5
    Member #
    13007
    that sounds ideal, as it is impossible to update site at work and if i could do it from any pc on web that would be great, with out the need for any authoring software i take it? Is that very complex to set up?

  8. #7
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,694
    Member #
    5580
    Liked
    717 times
    Without seeing your site or knowing what you're changing, or even knowing
    if you can use PHP ....

    I'll show you how to use PHP anyhow, and you can try it later.

    1) Take your HTML file (example, index.html) and change the
    extension to .php (example, index.php).

    2) Create a text file called "title1.txt"
    Put this in the text file: This is the title test
    Save it and put in the same directory as your .php file

    3) Insert this in your .php file wherever you want the title to appear:
    <?php include 'title1.txt'; ?>

    That's it!


    All it does is substitute the contents of the "title1.txt" file wherever
    you have the php include.

    You could create includes anywhere you want, and any number of
    different text files.

    All you have to do now, is upload a new text file, and you can do that
    with PHP also. And you can do that right from your website if you wish.
    For now, just change the content of your .txt file and re-load your web page
    to see your new changes.


    .



Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 03:24 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com