getUSPageFiles (function)

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

Purpose

Retrieves all PHP files in the users/ directory and return them as an array.

Location

users/helpers/us_helpers.php

Parameters

This function does not take any arguments

Returns

Data Type Description of Returned Data
string Each string is the relative path of a PHP file in the users/ directory, with the $us_url_root variable prepended to it.

Further Documentation:

The function returns an array of strings, where each string is the relative path of a PHP file in the users/ directory, with the $us_url_root variable prepended to it.

Example usage:

// Assuming $us_url_root has already been defined
$pages = getUSPageFiles();
foreach ($pages as $page) {
echo '$page . '">' . $page . '
';
}



This example code would output HTML links for each PHP file in the users/ directory, using the relative paths returned by the getUSPageFiles function.