Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/wp-admin/includes
File: class-ftp.php
}
[500] Fix | Delete
[501] Fix | Delete
function rawlist($pathname="", $arg="") {
[502] Fix | Delete
return $this->_list(($arg?" ".$arg:"").($pathname?" ".$pathname:""), "LIST", "rawlist");
[503] Fix | Delete
}
[504] Fix | Delete
[505] Fix | Delete
function nlist($pathname="", $arg="") {
[506] Fix | Delete
return $this->_list(($arg?" ".$arg:"").($pathname?" ".$pathname:""), "NLST", "nlist");
[507] Fix | Delete
}
[508] Fix | Delete
[509] Fix | Delete
function is_exists($pathname) {
[510] Fix | Delete
return $this->file_exists($pathname);
[511] Fix | Delete
}
[512] Fix | Delete
[513] Fix | Delete
function file_exists($pathname) {
[514] Fix | Delete
$exists=true;
[515] Fix | Delete
if(!$this->_exec("RNFR ".$pathname, "rename")) $exists=FALSE;
[516] Fix | Delete
else {
[517] Fix | Delete
if(!$this->_checkCode()) $exists=FALSE;
[518] Fix | Delete
$this->abort();
[519] Fix | Delete
}
[520] Fix | Delete
if($exists) $this->SendMSG("Remote file ".$pathname." exists");
[521] Fix | Delete
else $this->SendMSG("Remote file ".$pathname." does not exist");
[522] Fix | Delete
return $exists;
[523] Fix | Delete
}
[524] Fix | Delete
[525] Fix | Delete
function fget($fp, $remotefile, $rest=0) {
[526] Fix | Delete
if($this->_can_restore and $rest!=0) fseek($fp, $rest);
[527] Fix | Delete
$pi=pathinfo($remotefile);
[528] Fix | Delete
if($this->_type==FTP_ASCII or ($this->_type==FTP_AUTOASCII and in_array(strtoupper($pi["extension"]), $this->AutoAsciiExt))) $mode=FTP_ASCII;
[529] Fix | Delete
else $mode=FTP_BINARY;
[530] Fix | Delete
if(!$this->_data_prepare($mode)) {
[531] Fix | Delete
return FALSE;
[532] Fix | Delete
}
[533] Fix | Delete
if($this->_can_restore and $rest!=0) $this->restore($rest);
[534] Fix | Delete
if(!$this->_exec("RETR ".$remotefile, "get")) {
[535] Fix | Delete
$this->_data_close();
[536] Fix | Delete
return FALSE;
[537] Fix | Delete
}
[538] Fix | Delete
if(!$this->_checkCode()) {
[539] Fix | Delete
$this->_data_close();
[540] Fix | Delete
return FALSE;
[541] Fix | Delete
}
[542] Fix | Delete
$out=$this->_data_read($mode, $fp);
[543] Fix | Delete
$this->_data_close();
[544] Fix | Delete
if(!$this->_readmsg()) return FALSE;
[545] Fix | Delete
if(!$this->_checkCode()) return FALSE;
[546] Fix | Delete
return $out;
[547] Fix | Delete
}
[548] Fix | Delete
[549] Fix | Delete
function get($remotefile, $localfile=NULL, $rest=0) {
[550] Fix | Delete
if(is_null($localfile)) $localfile=$remotefile;
[551] Fix | Delete
if (@file_exists($localfile)) $this->SendMSG("Warning : local file will be overwritten");
[552] Fix | Delete
$fp = @fopen($localfile, "w");
[553] Fix | Delete
if (!$fp) {
[554] Fix | Delete
$this->PushError("get","cannot open local file", "Cannot create \"".$localfile."\"");
[555] Fix | Delete
return FALSE;
[556] Fix | Delete
}
[557] Fix | Delete
if($this->_can_restore and $rest!=0) fseek($fp, $rest);
[558] Fix | Delete
$pi=pathinfo($remotefile);
[559] Fix | Delete
if($this->_type==FTP_ASCII or ($this->_type==FTP_AUTOASCII and in_array(strtoupper($pi["extension"]), $this->AutoAsciiExt))) $mode=FTP_ASCII;
[560] Fix | Delete
else $mode=FTP_BINARY;
[561] Fix | Delete
if(!$this->_data_prepare($mode)) {
[562] Fix | Delete
fclose($fp);
[563] Fix | Delete
return FALSE;
[564] Fix | Delete
}
[565] Fix | Delete
if($this->_can_restore and $rest!=0) $this->restore($rest);
[566] Fix | Delete
if(!$this->_exec("RETR ".$remotefile, "get")) {
[567] Fix | Delete
$this->_data_close();
[568] Fix | Delete
fclose($fp);
[569] Fix | Delete
return FALSE;
[570] Fix | Delete
}
[571] Fix | Delete
if(!$this->_checkCode()) {
[572] Fix | Delete
$this->_data_close();
[573] Fix | Delete
fclose($fp);
[574] Fix | Delete
return FALSE;
[575] Fix | Delete
}
[576] Fix | Delete
$out=$this->_data_read($mode, $fp);
[577] Fix | Delete
fclose($fp);
[578] Fix | Delete
$this->_data_close();
[579] Fix | Delete
if(!$this->_readmsg()) return FALSE;
[580] Fix | Delete
if(!$this->_checkCode()) return FALSE;
[581] Fix | Delete
return $out;
[582] Fix | Delete
}
[583] Fix | Delete
[584] Fix | Delete
function fput($remotefile, $fp, $rest=0) {
[585] Fix | Delete
if($this->_can_restore and $rest!=0) fseek($fp, $rest);
[586] Fix | Delete
$pi=pathinfo($remotefile);
[587] Fix | Delete
if($this->_type==FTP_ASCII or ($this->_type==FTP_AUTOASCII and in_array(strtoupper($pi["extension"]), $this->AutoAsciiExt))) $mode=FTP_ASCII;
[588] Fix | Delete
else $mode=FTP_BINARY;
[589] Fix | Delete
if(!$this->_data_prepare($mode)) {
[590] Fix | Delete
return FALSE;
[591] Fix | Delete
}
[592] Fix | Delete
if($this->_can_restore and $rest!=0) $this->restore($rest);
[593] Fix | Delete
if(!$this->_exec("STOR ".$remotefile, "put")) {
[594] Fix | Delete
$this->_data_close();
[595] Fix | Delete
return FALSE;
[596] Fix | Delete
}
[597] Fix | Delete
if(!$this->_checkCode()) {
[598] Fix | Delete
$this->_data_close();
[599] Fix | Delete
return FALSE;
[600] Fix | Delete
}
[601] Fix | Delete
$ret=$this->_data_write($mode, $fp);
[602] Fix | Delete
$this->_data_close();
[603] Fix | Delete
if(!$this->_readmsg()) return FALSE;
[604] Fix | Delete
if(!$this->_checkCode()) return FALSE;
[605] Fix | Delete
return $ret;
[606] Fix | Delete
}
[607] Fix | Delete
[608] Fix | Delete
function put($localfile, $remotefile=NULL, $rest=0) {
[609] Fix | Delete
if(is_null($remotefile)) $remotefile=$localfile;
[610] Fix | Delete
if (!file_exists($localfile)) {
[611] Fix | Delete
$this->PushError("put","cannot open local file", "No such file or directory \"".$localfile."\"");
[612] Fix | Delete
return FALSE;
[613] Fix | Delete
}
[614] Fix | Delete
$fp = @fopen($localfile, "r");
[615] Fix | Delete
[616] Fix | Delete
if (!$fp) {
[617] Fix | Delete
$this->PushError("put","cannot open local file", "Cannot read file \"".$localfile."\"");
[618] Fix | Delete
return FALSE;
[619] Fix | Delete
}
[620] Fix | Delete
if($this->_can_restore and $rest!=0) fseek($fp, $rest);
[621] Fix | Delete
$pi=pathinfo($localfile);
[622] Fix | Delete
if($this->_type==FTP_ASCII or ($this->_type==FTP_AUTOASCII and in_array(strtoupper($pi["extension"]), $this->AutoAsciiExt))) $mode=FTP_ASCII;
[623] Fix | Delete
else $mode=FTP_BINARY;
[624] Fix | Delete
if(!$this->_data_prepare($mode)) {
[625] Fix | Delete
fclose($fp);
[626] Fix | Delete
return FALSE;
[627] Fix | Delete
}
[628] Fix | Delete
if($this->_can_restore and $rest!=0) $this->restore($rest);
[629] Fix | Delete
if(!$this->_exec("STOR ".$remotefile, "put")) {
[630] Fix | Delete
$this->_data_close();
[631] Fix | Delete
fclose($fp);
[632] Fix | Delete
return FALSE;
[633] Fix | Delete
}
[634] Fix | Delete
if(!$this->_checkCode()) {
[635] Fix | Delete
$this->_data_close();
[636] Fix | Delete
fclose($fp);
[637] Fix | Delete
return FALSE;
[638] Fix | Delete
}
[639] Fix | Delete
$ret=$this->_data_write($mode, $fp);
[640] Fix | Delete
fclose($fp);
[641] Fix | Delete
$this->_data_close();
[642] Fix | Delete
if(!$this->_readmsg()) return FALSE;
[643] Fix | Delete
if(!$this->_checkCode()) return FALSE;
[644] Fix | Delete
return $ret;
[645] Fix | Delete
}
[646] Fix | Delete
[647] Fix | Delete
function mput($local=".", $remote=NULL, $continious=false) {
[648] Fix | Delete
$local=realpath($local);
[649] Fix | Delete
if(!@file_exists($local)) {
[650] Fix | Delete
$this->PushError("mput","cannot open local folder", "Cannot stat folder \"".$local."\"");
[651] Fix | Delete
return FALSE;
[652] Fix | Delete
}
[653] Fix | Delete
if(!is_dir($local)) return $this->put($local, $remote);
[654] Fix | Delete
if(empty($remote)) $remote=".";
[655] Fix | Delete
elseif(!$this->file_exists($remote) and !$this->mkdir($remote)) return FALSE;
[656] Fix | Delete
if($handle = opendir($local)) {
[657] Fix | Delete
$list=array();
[658] Fix | Delete
while (false !== ($file = readdir($handle))) {
[659] Fix | Delete
if ($file != "." && $file != "..") $list[]=$file;
[660] Fix | Delete
}
[661] Fix | Delete
closedir($handle);
[662] Fix | Delete
} else {
[663] Fix | Delete
$this->PushError("mput","cannot open local folder", "Cannot read folder \"".$local."\"");
[664] Fix | Delete
return FALSE;
[665] Fix | Delete
}
[666] Fix | Delete
if(empty($list)) return TRUE;
[667] Fix | Delete
$ret=true;
[668] Fix | Delete
foreach($list as $el) {
[669] Fix | Delete
if(is_dir($local."/".$el)) $t=$this->mput($local."/".$el, $remote."/".$el);
[670] Fix | Delete
else $t=$this->put($local."/".$el, $remote."/".$el);
[671] Fix | Delete
if(!$t) {
[672] Fix | Delete
$ret=FALSE;
[673] Fix | Delete
if(!$continious) break;
[674] Fix | Delete
}
[675] Fix | Delete
}
[676] Fix | Delete
return $ret;
[677] Fix | Delete
[678] Fix | Delete
}
[679] Fix | Delete
[680] Fix | Delete
function mget($remote, $local=".", $continious=false) {
[681] Fix | Delete
$list=$this->rawlist($remote, "-lA");
[682] Fix | Delete
if($list===false) {
[683] Fix | Delete
$this->PushError("mget","cannot read remote folder list", "Cannot read remote folder \"".$remote."\" contents");
[684] Fix | Delete
return FALSE;
[685] Fix | Delete
}
[686] Fix | Delete
if(empty($list)) return true;
[687] Fix | Delete
if(!@file_exists($local)) {
[688] Fix | Delete
if(!@mkdir($local)) {
[689] Fix | Delete
$this->PushError("mget","cannot create local folder", "Cannot create folder \"".$local."\"");
[690] Fix | Delete
return FALSE;
[691] Fix | Delete
}
[692] Fix | Delete
}
[693] Fix | Delete
foreach($list as $k=>$v) {
[694] Fix | Delete
$list[$k]=$this->parselisting($v);
[695] Fix | Delete
if( ! $list[$k] or $list[$k]["name"]=="." or $list[$k]["name"]=="..") unset($list[$k]);
[696] Fix | Delete
}
[697] Fix | Delete
$ret=true;
[698] Fix | Delete
foreach($list as $el) {
[699] Fix | Delete
if($el["type"]=="d") {
[700] Fix | Delete
if(!$this->mget($remote."/".$el["name"], $local."/".$el["name"], $continious)) {
[701] Fix | Delete
$this->PushError("mget", "cannot copy folder", "Cannot copy remote folder \"".$remote."/".$el["name"]."\" to local \"".$local."/".$el["name"]."\"");
[702] Fix | Delete
$ret=false;
[703] Fix | Delete
if(!$continious) break;
[704] Fix | Delete
}
[705] Fix | Delete
} else {
[706] Fix | Delete
if(!$this->get($remote."/".$el["name"], $local."/".$el["name"])) {
[707] Fix | Delete
$this->PushError("mget", "cannot copy file", "Cannot copy remote file \"".$remote."/".$el["name"]."\" to local \"".$local."/".$el["name"]."\"");
[708] Fix | Delete
$ret=false;
[709] Fix | Delete
if(!$continious) break;
[710] Fix | Delete
}
[711] Fix | Delete
}
[712] Fix | Delete
@chmod($local."/".$el["name"], $el["perms"]);
[713] Fix | Delete
$t=strtotime($el["date"]);
[714] Fix | Delete
if($t!==-1 and $t!==false) @touch($local."/".$el["name"], $t);
[715] Fix | Delete
}
[716] Fix | Delete
return $ret;
[717] Fix | Delete
}
[718] Fix | Delete
[719] Fix | Delete
function mdel($remote, $continious=false) {
[720] Fix | Delete
$list=$this->rawlist($remote, "-la");
[721] Fix | Delete
if($list===false) {
[722] Fix | Delete
$this->PushError("mdel","cannot read remote folder list", "Cannot read remote folder \"".$remote."\" contents");
[723] Fix | Delete
return false;
[724] Fix | Delete
}
[725] Fix | Delete
[726] Fix | Delete
foreach($list as $k=>$v) {
[727] Fix | Delete
$list[$k]=$this->parselisting($v);
[728] Fix | Delete
if( ! $list[$k] or $list[$k]["name"]=="." or $list[$k]["name"]=="..") unset($list[$k]);
[729] Fix | Delete
}
[730] Fix | Delete
$ret=true;
[731] Fix | Delete
[732] Fix | Delete
foreach($list as $el) {
[733] Fix | Delete
if ( empty($el) )
[734] Fix | Delete
continue;
[735] Fix | Delete
[736] Fix | Delete
if($el["type"]=="d") {
[737] Fix | Delete
if(!$this->mdel($remote."/".$el["name"], $continious)) {
[738] Fix | Delete
$ret=false;
[739] Fix | Delete
if(!$continious) break;
[740] Fix | Delete
}
[741] Fix | Delete
} else {
[742] Fix | Delete
if (!$this->delete($remote."/".$el["name"])) {
[743] Fix | Delete
$this->PushError("mdel", "cannot delete file", "Cannot delete remote file \"".$remote."/".$el["name"]."\"");
[744] Fix | Delete
$ret=false;
[745] Fix | Delete
if(!$continious) break;
[746] Fix | Delete
}
[747] Fix | Delete
}
[748] Fix | Delete
}
[749] Fix | Delete
[750] Fix | Delete
if(!$this->rmdir($remote)) {
[751] Fix | Delete
$this->PushError("mdel", "cannot delete folder", "Cannot delete remote folder \"".$remote."/".$el["name"]."\"");
[752] Fix | Delete
$ret=false;
[753] Fix | Delete
}
[754] Fix | Delete
return $ret;
[755] Fix | Delete
}
[756] Fix | Delete
[757] Fix | Delete
function mmkdir($dir, $mode = 0777) {
[758] Fix | Delete
if(empty($dir)) return FALSE;
[759] Fix | Delete
if($this->is_exists($dir) or $dir == "/" ) return TRUE;
[760] Fix | Delete
if(!$this->mmkdir(dirname($dir), $mode)) return false;
[761] Fix | Delete
$r=$this->mkdir($dir, $mode);
[762] Fix | Delete
$this->chmod($dir,$mode);
[763] Fix | Delete
return $r;
[764] Fix | Delete
}
[765] Fix | Delete
[766] Fix | Delete
function glob($pattern, $handle=NULL) {
[767] Fix | Delete
$path=$output=null;
[768] Fix | Delete
if(PHP_OS=='WIN32') $slash='\\';
[769] Fix | Delete
else $slash='/';
[770] Fix | Delete
$lastpos=strrpos($pattern,$slash);
[771] Fix | Delete
if(!($lastpos===false)) {
[772] Fix | Delete
$path=substr($pattern,0,-$lastpos-1);
[773] Fix | Delete
$pattern=substr($pattern,$lastpos);
[774] Fix | Delete
} else $path=getcwd();
[775] Fix | Delete
if(is_array($handle) and !empty($handle)) {
[776] Fix | Delete
foreach($handle as $dir) {
[777] Fix | Delete
if($this->glob_pattern_match($pattern,$dir))
[778] Fix | Delete
$output[]=$dir;
[779] Fix | Delete
}
[780] Fix | Delete
} else {
[781] Fix | Delete
$handle=@opendir($path);
[782] Fix | Delete
if($handle===false) return false;
[783] Fix | Delete
while($dir=readdir($handle)) {
[784] Fix | Delete
if($this->glob_pattern_match($pattern,$dir))
[785] Fix | Delete
$output[]=$dir;
[786] Fix | Delete
}
[787] Fix | Delete
closedir($handle);
[788] Fix | Delete
}
[789] Fix | Delete
if(is_array($output)) return $output;
[790] Fix | Delete
return false;
[791] Fix | Delete
}
[792] Fix | Delete
[793] Fix | Delete
function glob_pattern_match($pattern,$subject) {
[794] Fix | Delete
$out=null;
[795] Fix | Delete
$chunks=explode(';',$pattern);
[796] Fix | Delete
foreach($chunks as $pattern) {
[797] Fix | Delete
$escape=array('$','^','.','{','}','(',')','[',']','|');
[798] Fix | Delete
while(str_contains($pattern,'**'))
[799] Fix | Delete
$pattern=str_replace('**','*',$pattern);
[800] Fix | Delete
foreach($escape as $probe)
[801] Fix | Delete
$pattern=str_replace($probe,"\\$probe",$pattern);
[802] Fix | Delete
$pattern=str_replace('?*','*',
[803] Fix | Delete
str_replace('*?','*',
[804] Fix | Delete
str_replace('*',".*",
[805] Fix | Delete
str_replace('?','.{1,1}',$pattern))));
[806] Fix | Delete
$out[]=$pattern;
[807] Fix | Delete
}
[808] Fix | Delete
if(count($out)==1) return($this->glob_regexp("^$out[0]$",$subject));
[809] Fix | Delete
else {
[810] Fix | Delete
foreach($out as $tester)
[811] Fix | Delete
// TODO: This should probably be glob_regexp(), but needs tests.
[812] Fix | Delete
if($this->my_regexp("^$tester$",$subject)) return true;
[813] Fix | Delete
}
[814] Fix | Delete
return false;
[815] Fix | Delete
}
[816] Fix | Delete
[817] Fix | Delete
function glob_regexp($pattern,$subject) {
[818] Fix | Delete
$sensitive=(PHP_OS!='WIN32');
[819] Fix | Delete
return ($sensitive?
[820] Fix | Delete
preg_match( '/' . preg_quote( $pattern, '/' ) . '/', $subject ) :
[821] Fix | Delete
preg_match( '/' . preg_quote( $pattern, '/' ) . '/i', $subject )
[822] Fix | Delete
);
[823] Fix | Delete
}
[824] Fix | Delete
[825] Fix | Delete
function dirlist($remote) {
[826] Fix | Delete
$list=$this->rawlist($remote, "-la");
[827] Fix | Delete
if($list===false) {
[828] Fix | Delete
$this->PushError("dirlist","cannot read remote folder list", "Cannot read remote folder \"".$remote."\" contents");
[829] Fix | Delete
return false;
[830] Fix | Delete
}
[831] Fix | Delete
[832] Fix | Delete
$dirlist = array();
[833] Fix | Delete
foreach($list as $k=>$v) {
[834] Fix | Delete
$entry=$this->parselisting($v);
[835] Fix | Delete
if ( empty($entry) )
[836] Fix | Delete
continue;
[837] Fix | Delete
[838] Fix | Delete
if($entry["name"]=="." or $entry["name"]=="..")
[839] Fix | Delete
continue;
[840] Fix | Delete
[841] Fix | Delete
$dirlist[$entry['name']] = $entry;
[842] Fix | Delete
}
[843] Fix | Delete
[844] Fix | Delete
return $dirlist;
[845] Fix | Delete
}
[846] Fix | Delete
// <!-- --------------------------------------------------------------------------------------- -->
[847] Fix | Delete
// <!-- Private functions -->
[848] Fix | Delete
// <!-- --------------------------------------------------------------------------------------- -->
[849] Fix | Delete
function _checkCode() {
[850] Fix | Delete
return ($this->_code<400 and $this->_code>0);
[851] Fix | Delete
}
[852] Fix | Delete
[853] Fix | Delete
function _list($arg="", $cmd="LIST", $fnction="_list") {
[854] Fix | Delete
if(!$this->_data_prepare()) return false;
[855] Fix | Delete
if(!$this->_exec($cmd.$arg, $fnction)) {
[856] Fix | Delete
$this->_data_close();
[857] Fix | Delete
return FALSE;
[858] Fix | Delete
}
[859] Fix | Delete
if(!$this->_checkCode()) {
[860] Fix | Delete
$this->_data_close();
[861] Fix | Delete
return FALSE;
[862] Fix | Delete
}
[863] Fix | Delete
$out="";
[864] Fix | Delete
if($this->_code<200) {
[865] Fix | Delete
$out=$this->_data_read();
[866] Fix | Delete
$this->_data_close();
[867] Fix | Delete
if(!$this->_readmsg()) return FALSE;
[868] Fix | Delete
if(!$this->_checkCode()) return FALSE;
[869] Fix | Delete
if($out === FALSE ) return FALSE;
[870] Fix | Delete
$out=preg_split("/[".CRLF."]+/", $out, -1, PREG_SPLIT_NO_EMPTY);
[871] Fix | Delete
// $this->SendMSG(implode($this->_eol_code[$this->OS_local], $out));
[872] Fix | Delete
}
[873] Fix | Delete
return $out;
[874] Fix | Delete
}
[875] Fix | Delete
[876] Fix | Delete
// <!-- --------------------------------------------------------------------------------------- -->
[877] Fix | Delete
// <!-- Partie : gestion des erreurs -->
[878] Fix | Delete
// <!-- --------------------------------------------------------------------------------------- -->
[879] Fix | Delete
// Gnre une erreur pour traitement externe la classe
[880] Fix | Delete
function PushError($fctname,$msg,$desc=false){
[881] Fix | Delete
$error=array();
[882] Fix | Delete
$error['time']=time();
[883] Fix | Delete
$error['fctname']=$fctname;
[884] Fix | Delete
$error['msg']=$msg;
[885] Fix | Delete
$error['desc']=$desc;
[886] Fix | Delete
if($desc) $tmp=' ('.$desc.')'; else $tmp='';
[887] Fix | Delete
$this->SendMSG($fctname.': '.$msg.$tmp);
[888] Fix | Delete
return(array_push($this->_error_array,$error));
[889] Fix | Delete
}
[890] Fix | Delete
[891] Fix | Delete
// Rcupre une erreur externe
[892] Fix | Delete
function PopError(){
[893] Fix | Delete
if(count($this->_error_array)) return(array_pop($this->_error_array));
[894] Fix | Delete
else return(false);
[895] Fix | Delete
}
[896] Fix | Delete
}
[897] Fix | Delete
[898] Fix | Delete
$mod_sockets = extension_loaded( 'sockets' );
[899] Fix | Delete
if ( ! $mod_sockets && function_exists( 'dl' ) && is_callable( 'dl' ) ) {
[900] Fix | Delete
$prefix = ( PHP_SHLIB_SUFFIX == 'dll' ) ? 'php_' : '';
[901] Fix | Delete
@dl( $prefix . 'sockets.' . PHP_SHLIB_SUFFIX ); // phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.dlDeprecated
[902] Fix | Delete
$mod_sockets = extension_loaded( 'sockets' );
[903] Fix | Delete
}
[904] Fix | Delete
[905] Fix | Delete
require_once __DIR__ . "/class-ftp-" . ( $mod_sockets ? "sockets" : "pure" ) . ".php";
[906] Fix | Delete
[907] Fix | Delete
if ( $mod_sockets ) {
[908] Fix | Delete
class ftp extends ftp_sockets {}
[909] Fix | Delete
} else {
[910] Fix | Delete
class ftp extends ftp_pure {}
[911] Fix | Delete
}
[912] Fix | Delete
[913] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function