如果下一个代码给我段错误,我需要做什么?
$handle = opendir("ssh2.sftp://$sftp".'/usr/bin/');
$file = readdir($handle);
closedir($handle);
$sftp 在哪里
$this->_connection = ssh2_connect($this->_server, 22);
if($this->_authType==ExportInterface::CONN_AUTH_KEY) {
ssh2_auth_pubkey_file($this->_connection,$this->_user,$this->_key,$this->_privateKey);
} else {
ssh2_auth_password($this->_connection,$this->_user,$this->_password);
}
$sftp = ssh2_sftp($this->_connection);
连接工作良好。段错误是只有我使用 readdir 函数时。