get_all_items
get_all_items($path,$include_subfolders=false,$only_folders=false,$timeout=60); - this function is used to get all items in the specified folder
The function accepts parameters as input:
$path – path to the folder where you want to get all the elements (string). It can be either absolute or relative (relative to the script folder).
$include_subfolders – whether to include subfolders (true - include, false - not include) .
$only_folders – include only folders (true - only folders, false - both folders and files) .
$timeout – maximum time to perform this operation (in seconds), by default - 60 seconds, if the operation is not completed during this time, the script continues to run further.
After testing, the function returns the result of its work to the script :
string with paths to elements – a string with paths to elements in the specified folder, separated by <br> (string)false – there is no such folder (boolean)