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 5 of 5
  1. #1
    Senior Member solidgold's Avatar
    Join Date
    Jun 2006
    Posts
    766
    Member #
    13373
    how can a php page be updated using a .txt file? does anybody know of any tutorials? this would be really helpful for me.
    thanks,
    Solidgold

  2.  

  3. #2
    Senior Member leprechaun13's Avatar
    Join Date
    May 2005
    Location
    Northampton
    Posts
    487
    Member #
    10058
    just use the following where you want the text file to be output.

    PHP Code:
    <?php include('somefile.txt'?>
    Thus all you have to do is change the text files content instead of editing the webpage
    Regards Phil,


  4. #3
    Senior Member solidgold's Avatar
    Join Date
    Jun 2006
    Posts
    766
    Member #
    13373
    WHAT?! thats insanely easily!! thanks a lot!

  5. #4
    Senior Member leprechaun13's Avatar
    Join Date
    May 2005
    Location
    Northampton
    Posts
    487
    Member #
    10058
    No problems m8
    Regards Phil,


  6. #5
    Senior Member Steax's Avatar
    Join Date
    Dec 2006
    Location
    Bandung, Indonesia
    Posts
    1,207
    Member #
    14572
    But you might wanna be weary about that. If you accidentally or for whatever reason use the <? ?> tags in the text file, or you want to show the file "as-is" (without converting tags into HTML tags), you'll want to use file_get_contents().
    Note on code: If I give code, please note that it is simply sample code to demonstrate an effect. It is not meant to be used as-is; that is the programmer's job. I am not responsible to give you support or be held liable for anything that happens when using my code.


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 04:08 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com