mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-16 10:15:14 +00:00
Merge branch '1.0' into 2.0
This commit is contained in:
commit
c680c604c8
@ -3004,9 +3004,17 @@ class SFTP extends SSH2
|
||||
$packet_type = '-> ' . $this->packet_types[$type] .
|
||||
' (' . round($stop - $start, 4) . 's)';
|
||||
if (NET_SFTP_LOGGING == self::LOG_REALTIME) {
|
||||
echo "<pre>\r\n" . $this->_format_log(array($data), array($packet_type)) . "\r\n</pre>\r\n";
|
||||
flush();
|
||||
ob_flush();
|
||||
switch (PHP_SAPI) {
|
||||
case 'cli':
|
||||
$start = $stop = "\r\n";
|
||||
break;
|
||||
default:
|
||||
$start = '<pre>';
|
||||
$stop = '</pre>';
|
||||
}
|
||||
echo $start . $this->_format_log(array($data), array($packet_type)) . $stop;
|
||||
@flush();
|
||||
@ob_flush();
|
||||
} else {
|
||||
$this->packet_type_log[] = $packet_type;
|
||||
if (NET_SFTP_LOGGING == self::LOG_COMPLEX) {
|
||||
@ -3113,9 +3121,17 @@ class SFTP extends SSH2
|
||||
$packet_type = '<- ' . $this->packet_types[$this->packet_type] .
|
||||
' (' . round($stop - $start, 4) . 's)';
|
||||
if (NET_SFTP_LOGGING == self::LOG_REALTIME) {
|
||||
echo "<pre>\r\n" . $this->_format_log(array($packet), array($packet_type)) . "\r\n</pre>\r\n";
|
||||
flush();
|
||||
ob_flush();
|
||||
switch (PHP_SAPI) {
|
||||
case 'cli':
|
||||
$start = $stop = "\r\n";
|
||||
break;
|
||||
default:
|
||||
$start = '<pre>';
|
||||
$stop = '</pre>';
|
||||
}
|
||||
echo $start . $this->_format_log(array($packet), array($packet_type)) . $stop;
|
||||
@flush();
|
||||
@ob_flush();
|
||||
} else {
|
||||
$this->packet_type_log[] = $packet_type;
|
||||
if (NET_SFTP_LOGGING == self::LOG_COMPLEX) {
|
||||
|
Loading…
Reference in New Issue
Block a user