DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Need some Web advice  (Read 6,907 times)

Cpilot

  • Charter Honorary Member
  • Joined in 2006
  • ***
  • Posts: 293
    • Coding Snacks
Need some Web advice
« on: May 06, 2007, 01:59 AM »
OK I've looked around but I'm having trouble trying to find what I want.

What I want to be able to do is place a folder on a server and set up a location on my webpage that will read a text file placed into that folder to display the text as it's formatted in the text file.

I hope I'm explaining this right cause I sure can't figure out how to google for it.  ;D

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: Need some Web advice
« Reply #1 on: May 06, 2007, 02:19 AM »
Quote
I hope I'm explaining this right cause I sure can't figure out how to google for it.

can you explain a bit more? it's not entirely clear what you are wanting to do.

maybe what you want is just a php page which does nothing more but do:
Code
<pre>
DUMP CONTENTS OF TEXT FILE HERE WHICH WILL KEEP ITS FORMATTING BECAUSE OF THE <PRE> tags
</pre>

« Last Edit: May 06, 2007, 02:21 AM by mouser »

Cpilot

  • Charter Honorary Member
  • Joined in 2006
  • ***
  • Posts: 293
    • Coding Snacks
Re: Need some Web advice
« Reply #2 on: May 06, 2007, 04:25 AM »
Quote
I hope I'm explaining this right cause I sure can't figure out how to google for it.

can you explain a bit more? it's not entirely clear what you are wanting to do.

maybe what you want is just a php page which does nothing more but do:
Code
<pre>
DUMP CONTENTS OF TEXT FILE HERE WHICH WILL KEEP ITS FORMATTING BECAUSE OF THE <PRE> tags
</pre>

Yeah I was afraid that might happen. :D

What I would like to be able to do is create a section on a webpage what could be updated by simply uploading a text file.
Like a sort of miniblog without the database.
A way to easily change the information without having to make the change and then re-uploading the entire html file.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: Need some Web advice
« Reply #3 on: May 06, 2007, 04:31 AM »
http://www.tizag.com/phpT/include.php

basically just put this line in your html file where you want to include the contents of the file
<?php include("filename.txt");?>

Cpilot

  • Charter Honorary Member
  • Joined in 2006
  • ***
  • Posts: 293
    • Coding Snacks
Re: Need some Web advice
« Reply #4 on: May 06, 2007, 04:36 AM »
http://www.tizag.com/phpT/include.php

basically just put this line in your html file where you want to include the contents of the file
<?php include("filename.txt");?>
Thanks,
I knew there was a simple solution but I couldn't figure out how to google it.

Original address: https://www.donationcoder.com/forum/index.php?topic=8382.0