File_Fortune::setHeaderFile() – Set header file name


require_once 'File/Fortune.php';

File_Fortune File_Fortune::setHeaderFile ( string $headerFile )


Fortune files consist of an ASCII file containing fortunes separated by a delimiter, and a binary header file that contains meta information such as the delimter used, number of fortunes, minimum and maximum length of fortunes contained in the file, and the offsets where each fortune exist in the file.

In most cases, this file is simply the name of the fortune file plus the extension 'dat', and File_Fortune will automatically detect this. If this is not the case, however, you may explicitly set the header file name using this method.


string $headerFile


throws no exceptions thrown


This function can not be called statically.

Set multiple fortune files (Previous) Update an existing fortune (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.