currentFolder (function)

Last updated: Tue, Jan 3, 2023 11:15 am
Return to Knowledgebase

Purpose

Returns the folder of the current file

Location

users/helpers/helpers.php

Version Information

First Introduced v2.5.0

See Also:

currentPage (function)

Parameters

This function does not take any arguments

Returns

Data Type Description of Returned Data
string Returns a string of the current folder name

Example

echo currentFolder();

Further Documentation:

Very simple function to refer to the current folder of the file it is being called from. If you called this function from users/login.php it would return "users".  Note that it only searches one level deep. If your file is located in.  If your file is in users/helpers, it will only return "helpers".