Skip to content
Advertisement

How do I upload folders via FTP PHP

I’m writing a script that can FTP files and folders using PHP functionality.

I’m able to upload files via ftp but not folders, is is possible to upload folders via PHP Ftp

My file code looks similar to below

$upload = ftp_put($connection, '123test.co.za/images/1.jpg','1.jpg', FTP_ASCII);

Advertisement

Answer

This manual page, has code showing how to do it using ftp_mkdir.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement