General Introduction
Features
Settings
Email system
Date and Time
URL rewrite
Special constants
Special variables
Complex logic in filter
AddBufferContent
AddChainItem
AddHeadScript
AddHeadString
AddPanelButton
AddViewContent
AuthForm
CaptchaCheckCode
CaptchaGetCode
ConvertCharset
ConvertCharsetArray
CopyFileAccessPermission
GetCSS
GetCurDir
GetCurPage
GetCurPageParam
GetCurUri
GetDirProperty
GetDirPropertyList
GetException
GetFileAccessPermission
GetFileContent
GetFileRecursive
GetMenu
GetMenuHtml
GetMenuHtmlEx
GetMeta
GetNavChain
GetPageProperty
GetPagePropertyList
GetPanel
GetProperty
GetPublicShowMode
GetShowIncludeAreas
GetSiteByDir
GetTemplatePath
GetTitle
GetUserRight
GetUserRoles
IncludeAdminFile
IncludeComponent
IncludeFile
IncludeString
IsHTTPS
MoveJSToBody
RemoveFileAccessPermission
ResetException
SaveFileContent
SetAdditionalCSS
SetCurPage
SetDirProperty
SetFileAccessPermission
SetPageProperty
SetTemplateCSS
SetTitle
ShowBanner
ShowBodyScripts
ShowCSS
ShowHead
ShowHeadScripts
ShowHeadStrings
ShowMeta
ShowNavChain
ShowPanel
ShowProperty
ShowSpreadCookieHTML
ShowTitle
ShowViewContent
ThrowException
get_cookie
set_cookie
GetFileRecursive
mixed CMain::GetFileRecursive( string FileName, mixed dir )
The method searches for a file recursively up the folder hierarchy. If the file is found - returns path to the found file relative to the root, otherwise returns false. Non-static method.
Parameters
Parameter | Description |
---|---|
FileName | File name. |
dir | Path to the folder from which the search is to be performed. If set to false, the search will start from the current folder.
Optional; false by default. |
Examples of use
<? // search for the file params.php up the folder hierarchy // starting from the current folder. // if the file can be found, include it include($_SERVER["DOCUMENT_ROOT"].$APPLICATION->GetFileRecursive("params.php")); ?>
© «Bitrix24», 2001-2024
Up