From aefee93cf68542f8e5f75c12fd47f1a145e02741 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Thu, 13 Aug 2015 09:10:09 +0100 Subject: [PATCH] Can now load content over FTP Include new FTP control lib, no need for saveType here and exclude/include doing certain things if we have an ftpSite Getting file over FTP creates connection and establishes any errors plus loads conent Image display uses ftpSite and also remove stray end script tag --- lib/file-control.php | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/lib/file-control.php b/lib/file-control.php index 00f26c3..e67022f 100644 --- a/lib/file-control.php +++ b/lib/file-control.php @@ -1,6 +1,7 @@ @@ -9,9 +10,6 @@ $t = $text['file-control']; '); + exit; + } + // Get our file contents and close the FTP connection + $loadedFile = toUTF8noBOM(ftpGetContents($ftpConn, $root.$fileLoc."/".$fileName, $ftpMode)); + ftp_close($ftpConn); + // Get local file + } else { $loadedFile = toUTF8noBOM(file_get_contents($file,false,$context),true); + } echo ' // Finally, switch mode in case we have saved, renamed file etc top.ICEcoder.switchMode();