getPageFiles (function)

Last updated: Mon, Apr 17, 2023 10:07 am
Return to Knowledgebase

Purpose

Used to get an array of PHP files in the parent directory of the script file.

Location

users/helpers/us_helpers.php

Parameters

This function does not take any arguments

Further Documentation:

The getPageFiles() function is used to get an array of PHP files in the parent directory of the script file. It uses the glob() function to find all PHP files and returns an associative array where the keys and values are the file paths.

Example Usage:


$pages = getPageFiles();
foreach ($pages as $page) {
echo $page . '
';
}



This code will output the path of each PHP file in the parent directory of the script file.