I need, knowing the file id, to copy it into the same folder where the current script is running. I do this:
CFile::CopyFile($arFields["DETAIL_PICTURE"], true, $_SERVER["DOCUMENT_ROOT"].$APPLICATION->GetCurDir())
But the file is copied to the same folder, where it lies. What could be the problem?
__DIR__, maybe it will be better this way - apelsinka223CFile::CopyFile($arFields["DETAIL_PICTURE"], true, __DIR__)also did not work - S.Ivanov