Imagine you have a client (Wahoo!!!) who clearly doesnt know html (If they did, why would they be your client? lol) but they want to be able to update the content of the site themselves...
I can't use a CMS, way to much bother... So... I want to be able to have a .txt file whcih is displayed on the site. So if for example, there is an index.html page and a index.txt page, I want to put something that means "Display index.txt here, in xx font and xx size" so then the client just edits the txt file and voila!
Help!
Comments
<?php include("fileurl.txt"); ?>
This requires that PHP is installed on the server; it won't work on Geocities or any of the other retarded hosts which don't include PHP.
Host Assessment | Tetris | Blog | Great Big Blog
Buy Video Games | Nathan
Video Game Cheats Hints Codes | Click Joke | Game Livewire
I stopped using geocities ages ago! lol...
But thanks.
So, all I do to get the .txt file on the page is just put taht tiny bit of code wherever I want to text to be?
And If they edit the .txt dile the site will automatically update itself and all?
but yea it should change
And how do I change the font etc from in the html document...
So, the .txt file is all in starnrad black text...
What If I want to make it bigger or change the colour from within the html file...
How do I do that?
So I just put a bit of css like font-color:FF0000 into the div tag and that will still edit how the text from the .txt looks on the webpage? Even though there is PHP involved etc?
that html file could then contain the content which needs to be edited but get rid of all head, body and any other tags and tell your client to edit it using notepade and to use <br> to go to the next line.
also then you could maybe write a small readme and tell him how to do div tags, their not that hard
The Royal Ram
Plus The other one is quicker... Just paste one line in the html and make a new .txt file for every html file... which is bout 5.... lol
The Royal Ram
I believe that the problem with this, is that it will simply include the exact text file directly into the HTML. So if you have
[code:1:ac2f3d3496]Hello
World[/code:1:ac2f3d3496]
With the spaces in it in your text file, like regular un-formatted text in HTML it will show directly beside it.
[code:1:ac2f3d3496]Hello World[/code:1:ac2f3d3496]
Including a file will put the EXACT CONTENTS of the file DIRECTLY into the page. It is as if it was typed right into the page.
if the client doesn't want to use a CMS they could also use something like (WYSIWYG) Mozilla Composer which comes with the browser Mozilla (not Firefox, I don't believe, sorry).
Host Assessment | Tetris | Blog | Great Big Blog
Buy Video Games | Nathan
Video Game Cheats Hints Codes | Click Joke | Game Livewire
The best way to solve that problem would be to actually read the content of the text file rather than just include it. Then u can replace the breaks in the text file with a br tag!
[code:1:e5d44a4527]
$file = "textfile.txt";
$do = fopen($file, "r");
$data = fread($do, filesize($file));
fclose($do);
echo $data;
[/code:1:e5d44a4527]
Now you'll have to excuse me I've forgotten how to replace characters... I could guess but I'd probably be wrong.
Anyway, by using this you can do alot more things like separate the text by using a delimiter and being able to place certain bits of text in different places, in a different order, etc.
The Royal Ram
Submit your threads
Music Forum
My Web Entrepreneur Blog
VolumeBoost - Member Chosen Music News
I don't know about SSI, however. Can someone clarify, please?
<!--#include virtual="/path/to/file/filename.txt" -->
Host Assessment | Tetris | Blog | Great Big Blog
Buy Video Games | Nathan
Video Game Cheats Hints Codes | Click Joke | Game Livewire
<!--#include virtual="/path/to/file/filename.txt" -->
where I want the text to go, and that's it?
index.shtml
**No capital letters
The Royal Ram
The Royal Ram
But what would you do. Press shift S? or type [ b ] s [ / b ] ? :P lol
The Royal Ram
path/to/ as the directory.
Host Assessment | Tetris | Blog | Great Big Blog
Buy Video Games | Nathan
Video Game Cheats Hints Codes | Click Joke | Game Livewire