Page 1 of 1

My New Project

Posted: Tue Jul 26, 2005 2:07 am
by Majoraslayer
I'm going to start working on making a MOD for phpBB that will allow for a really good CMS. However.....I'm still a complete PHP n00b, so I really need some help.

First of all, I was wondering is if there is a way to use PHP to run FTP commands. One part of the MOD will require getting a LIST of the files in a directory, then listing them and hyperlinking them to a page that allows you to choose different actions to do to the file you selected (edit, delete, etc.). Does anyone know of some tips on how I might go about this?

Posted: Tue Jul 26, 2005 2:11 am
by John Cartwright
As for listing files and dirs I would recommend using glob() or readdir(). I'm sure you can pick up plenty of ready made scripts that perform exactly this, and could be easily modified to serve your script's purpose. If I'm not mistaken there are several examples in the user comments of both glob() and readdir().
And yes, PHP does have ftp -- ftp_connect() should get you started.