Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test functions

tail()

Description

Tails a file using native PHP functions.

First introduced with system console.
Credit to:
https://www.geekality.net/2011/05/28/php-tail-tackling-large-files

As of 2020-06-29 the website is showing that all contents/code are CC BY 3.0
https://creativecommons.org/licenses/by/3.0/

Example:
tail($file_path, 10, 4096, [
'name' => 'resourcespace.tail_search',
'params' => ['search_terms' => ['term1', 'term2']]
]);

represent the filter name and its params.

Parameters

ColumnTypeDefaultDescription
$filename string
$lines integer 10
$buffer integer 4096
$filters array [] List of stream filters. Each value is an array containing the "name" and "params" keys. These

Return

string

This article was last updated 24th May 2023 09:05 Europe/London time based on the source file dated 19th May 2023 16:40 Europe/London time.