php-sftp
php-sftp copied to clipboard
Directory Separator on Windows
When executing this from a Windows PHP environment, the DIRECTORY_SEPARATOR
constant is defined as \
, however with SFTP the directory separator should ALWAYS be /
.
Otherwise a file that should go in Folder1 > Folder2 > MyFile
ends up uploading like "Folder1\Folder2\MyFile"
as the entire filename instead of being in the directories.
To avoid this issue, I think we have to use the /
instead.