View / Download this file.
------------------------
get_file_text() FUNCTION
------------------------
------------
USAGE_FORMAT
------------
Where $text is the returned file text:
$text = &get_file_text($file);
$text = &get_file_text(@files);
-----------
DESCRIPTION
-----------
The get_file_text() function opens a file and returns the file's text.
---------
ARGUMENTS
---------
$file/@files
REQUIRED
Accepts one or more file path/names. The path can either be the absolute
system path to the file, or the relative system path from the location of
the PTM script. If more than one file is requested, the return value will
simply string the file contents together.
-------
RETURNS
-------
A text string containing the contents of the requested file(s).
--------------
USAGE EXAMPLES
--------------
------------------------------------------------------------------
Example 1: Displaying the Contents of a Text File in HTML Pre Tags
------------------------------------------------------------------
<pre><?* &get_file_text('file.txt') ?></pre>
------------------------------------------------------------------
Example 2: Displaying the Contents of Multiple Files in a TextArea
------------------------------------------------------------------
<textarea><?* &get_file_text('file1.txt', 'file2.txt') ?></textarea>
--------
SEE ALSO
--------
TAGS
DISPLAY, NOHTML, TEMPLATE
FUNCTIONS
append_file_text(), write_file_text()
|