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
SaveFileContent
bool CMain::SaveFileContent( string abs_path, string content )
The method saves the page to disk. Returns true on success and false otherwise. This method fires the OnChangeFile event. Non-static method.
Parameters
Parameter | Description |
---|---|
abs_path | Full path to the file on disk. |
content | File content. |
See Also
Examples of use
<? $file_content = ' <? require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php"); $APPLICATION->SetTitle("Title"); ?> Page content... <?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php");?> '; $abs_path = $_SERVER["DOCUMENT_ROOT"]."/en/index.php"; if(!$APPLICATION->SaveFileContent($abs_path, $file_content)) ShowError("Error saving file"); ?>
© «Bitrix24», 2001-2024
Up