mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 07:13:59 +01:00
ftpStart and ftpEnd functions added
This commit is contained in:
@@ -1,4 +1,23 @@
|
||||
<?php
|
||||
// Start a FTP connection
|
||||
function ftpStart() {
|
||||
global $ftpConn, $ftpLogin, $ftpHost, $ftpUser, $ftpPass, $ftpPasv;
|
||||
|
||||
// Establish connection, login and maybe use pasv
|
||||
$ftpConn = ftp_connect($ftpHost);
|
||||
$ftpLogin = ftp_login($ftpConn, $ftpUser, $ftpPass);
|
||||
if ($ftpPasv) {
|
||||
ftp_pasv($ftpConn, true);
|
||||
}
|
||||
}
|
||||
|
||||
// End a FTP connection
|
||||
function ftpEnd() {
|
||||
global $ftpConn;
|
||||
|
||||
ftp_close($ftpConn);
|
||||
}
|
||||
|
||||
// Get dir/file lists (simple and detailed) from FTP detailed rawlist response
|
||||
function ftpGetList($ftpConn, $directory = '.') {
|
||||
$simpleList = $detailedList = array();
|
||||
|
||||
Reference in New Issue
Block a user