WordPress at Your Fingertips
function is not described

ftp_sockets::_exec() public WP 1.0

{} It's a method of the class: ftp_sockets{}

No Hooks.


null. Nothing.


$ftp_sockets = new ftp_sockets();
$ftp_sockets->_exec( $cmd, $fnction );
$cmd (required)
$fnction **
Default: "_exec"

Code of ftp_sockets::_exec() WP 5.8.2

function _exec($cmd, $fnction="_exec") {
	if(!$this->_ready) {
		$this->PushError($fnction,'Connect first');
		return FALSE;
	if($this->LocalEcho) echo "PUT > ",$cmd,CRLF;
	$status=@socket_write($this->_ftp_control_sock, $cmd.CRLF);
	if($status===false) {
		$this->PushError($fnction,'socket write failed', socket_strerror(socket_last_error($this->stream)));
		return FALSE;
	if(!$this->_readmsg($fnction)) return FALSE;
	return TRUE;