Contact | Privacy | Datenschutzerklärung | Impressum


Format: readFileLines (file [, fromline [, numlines]])

Purpose: Reads (part of) a text file. The parameter file must be a filename and of type string, fromline and numlines are integers. If fromline is not given it defaults to 0. If numlines is not given it defaults to all lines starting from fromline to the end of the file.

Return Values: If the file was read successfully, an array is returned with numlines elements where element i contains line fromline+i of the file with name file. If an error occurred while reading the file, a string is returned denoting the error message.

Configuration: The function is not allowed in secure mode.


// This example shows how to use the readFileLines function and the
// writefile tag to implement an appendfile function:

<defenv appendFile f;
 writefile f;
 ? c "\r\n%A";

See Also: copyfile(), deletefile(), directory(), mkdir(), movefile(), stat(), utime(), writefile.

This page was dynamically generated by the web application development tool RADpage of H.E.I. Try the AJAX Article (in German) on
© 1996-2024 H.E.I. All Rights Reserved.

Component Guide
  Language Guide
  Language Ref.
    General Design
    Lexical Structure
    heitml Tags
    heitml Functions
    Advanced Functions
    Database Access
    Global Variables
    Form Fields
    Server Variables
    heitml Syntax
  Component Ref.
  Class Library
  User Components
  New Features
  heitml 1
User Guide
Contact / Impressum