2011年5月12日星期四

NetTuts.com: How to Work with PHP and FTP


On NetTuts.com there's a new article stepping you through what you'll need to know about using FTP in PHP, including a basic useful and expandable class.



It's always important to first outline exactly what functionality your class should include. In our case: connecting to a server, create a folder on the server, upload a file, change directory, retrieving the directory listing and downloading a file.


They first look at what FTP is and then how to set up the class that includes some simple logging, connection handling and how to call the class with a username, password and hostname. The class lets you create a remote directory, upload a file, view a list of remote files and downloading a selected file. Full source for the class is available as a download.

没有评论:

发表评论