PTM Logo Version 0.5.1 Beta
Home    SVN    Downloads    Documentation    Forum    Contact
This Site is 100%
Powered by PTM

SourceForge.net Logo
Documentation
I   Index
II   GNU GPL
III   Description
IV   Installation
V   Language Overview
VI   Tags
VII   Variables
VIII   Functions
  _PTM()
  _PTM_FILE()
  append_file_text()
  basic_header()
  delete_cookie()
  end_session()
  get_dir_list()
  get_file_text()
  is_secure()
  is_session()
  nohtml()
  redirect_header()
  session_add()
  session_delete()
  session_domain()
  session_id()
  session_name()
  session_path()
  session_secure()
  set_basic_header()
  set_cookie()
  set_redirect_header()
  start_session()
  update_session()
  write_file_text()
IX   Modules
Documentation
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()
Home    SVN    Downloads    Documentation    Forum    Contact