A
A
ant1vit2021-04-05 13:19:08
PHP
ant1vit, 2021-04-05 13:19:08

How to connect using PHP to FTP and list FTP files and folders?

How can I make it possible to connect to ftp via php (ftp on another hosting) and display the contents (folders, files) with the ability to download them and that it would be possible to navigate through the folders, as in the example?
Example

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
smilingcheater, 2021-04-05
@ant1vit

Start by reading the FTP docs https://www.php.net/manual/en/function.ftp-connect.php

I
Ivan Kulakov, 2021-04-05
@ivankprod

If I understand correctly, then you need to dig towards cURL

A
Andrey Ivchenkov, 2021-04-15
@Groonya

See also https://flysystem.thephpleague.com/v2/docs/ - it makes working with FTP a bit easier.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question