Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
11-08-2007, 12:03 PM #1
Best way to proceed with FTP operations?
I am currently deciding which way to implement a class that handles FTP transfers.
From reading the PHP manual, I see that I have three options as follows:
1) Use the SSH extension in PECL.
2) Use the ftp built-ins.
Currently I have implemented method 3 because it is far more straight forward than either of the other two.
What, therefore, are the advantages (if any) of the other two methods?
All I am doing is opening an FTP connection, writing a bunch of files and closing the connection - which seems problem-free and very simple using method 3!
11-08-2007, 06:06 PM #2
- Join Date
- Jan 2007
- Thanked 58 Times in 54 Posts
The popular saying:
"If it ain't broke, don't fix it"
11-09-2007, 12:41 AM #3
11-09-2007, 01:23 AM #4
- Join Date
- Sep 2005
- Thanked 36 Times in 35 Posts
From the point of view of the 'user' of your finished class(es), they shouldn't care how the transport happens in the background, so switching in the future (or providing alternatives) shouldn't really be that difficult.
YAGNI (You ain't gonna need it) is another phrase to bear in mind when designing things, don't try and anticipate too much.