Display the info in a notepad / txt file in HTML

  • FIGIDIGI
  • Newbie
  • Newbie
  • FIGIDIGI
  • Posts: 7

Post 3+ Months Ago

Hello...
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
I have a question.
Just made a complete website in php, cos a client wants to edit the text on this site, without her having to learn html.
I used this code (works perfectly):

Code: [ Select ]
<? php
include ('welkom.txt');
?>
  1. <? php
  2. include ('welkom.txt');
  3. ?>


I just found out her server does not support php. :-(
All the work is not useless when I find a code to do the same thing, but then in css or html > SO display text she writes in notepad, and which she will upload to a server. And the webpage just opens that txt file and displays it in the page itself.

Is there a code for that???
something like < scr= url('welkom.txt') ??????

Thanx for helping / :roll:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
figidigi
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • tierra
  • Student
  • Student
  • User avatar
  • Posts: 91

Post 3+ Months Ago

There's a possibility that the server supports SSI (Server Side Includes), which you could just go like this:

Code: [ Select ]
<!--#include virtual="welkom.txt" -->


I know there's some Javascript to do it (should work most everywhere, don't need server software), but I'm not an expert there. I know my CSS fairly well, but I've never seen a way to do something like that using CSS. You could also use Apache directory directives (ask me how only if the server runs apache and no other method works). HTML won't do it period.

Oh yeah, and if you do SSI, your going to need to change the file name to .shtml or .sht (your php one, not the welkom.txt one) so that it's parsed by Apache.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

I have to agree with tierra.

I think this page may give you the info you need:

http://www.outfront.net/tutorials_02/ge ... ludes2.htm

Google Search: "asp includes"
  • FIGIDIGI
  • Newbie
  • Newbie
  • FIGIDIGI
  • Posts: 7

Post 3+ Months Ago

hI GUYS ...

Well I did dive into the whole ssi | asp thing

read the article from Katherine Nolan
she sais the following ...

"Whether you include a .htm or a .txt file you need to remove everything from the page except the content that is to be included. That is to say you should remove the <html></html> tags, the <head></head> tags and everything between them, and the <body></body> tags. "

This means that my complete lay-out will be gone. My client will never agree to that.

I found... (me mr smartass ) a solution though...
Use her non-php server for the whole site, then link to my server for all the php files (only the htm - pics are on the non-php server) then use the files my client uploaded on the non-php server to display.
So I just use php for displaying her uploads... smart huh??? lol / I think I make an estimate for the costs an I bet ya she will agree to that

So thanx guys for trying and all...
figidigi
:P
  • tierra
  • Student
  • Student
  • User avatar
  • Posts: 91

Post 3+ Months Ago

well, what she meant by that is that if the page your including the file from has already output the HTML junk, then you don't want it in the text file to be included... you could of still done it.

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 52 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.