If PHP is
installed on
the webserver,
you can have
.php pages. The
above code is
PHP, so it must
be executed
within a
webpage with
a.php
extension.
So wherever he
wants the text
to appear, use
the above code.
It's just
saying to
include the
file in the
page. where i
have
/path/to/file,
you need to
change that to
the location of
the text file
in the web
root. If it's
in the primary
directory, then
you can delete
"/path/to
/file"
and just put in
the name of the
file.
Example: File
is named
"updates.
txt" in
the
"articles
" folder.
Then the code
would
be: Code:
<?
include($_SERVE
R['DOCUMENT_RO
OT'].'/articl
es/updates.txt
');
?>
Each time he
wants to put in
updated text,
just add to it
and save. If he
uploads a new
file with the
same exact
name, it will
overwrite the
previous and
all data in the
original file
is lost...
What you should
consider doing
for him is
this: - Se
tup a table in
a database for
"updates
"
-
Create an HTML
form that will
store new
records to the
table (time
stamped)
Setup the
page to
retrieve the
records from
the table by
date.
Then, he can
type in his
updates in the
HTML form. This
would be a lot
easier for him
vs. modifying
text files and
uploading them.
It also allows
for better
management of
the data. You
can setup
titles and
other fields to
categorize
entries, tags,
and so on -
giving you more
flexibility. It
may take a
little effort
to setup at
first, but once
that's
complete, it's
setup forever!
|