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?
My New Project
Moderator: General Moderators
-
Majoraslayer
- Forum Commoner
- Posts: 64
- Joined: Thu Jun 30, 2005 11:50 am
- Location: In Your Mind...
- Contact:
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
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.
And yes, PHP does have ftp -- ftp_connect() should get you started.