array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'es', ), 'this' => array ( 0 => 'function.ssh2-sftp-unlink.php', 1 => 'ssh2_sftp_unlink', ), 'up' => array ( 0 => 'ref.ssh2.php', 1 => 'Funciones de SSH2', ), 'prev' => array ( 0 => 'function.ssh2-sftp-symlink.php', 1 => 'ssh2_sftp_symlink', ), 'next' => array ( 0 => 'function.ssh2-sftp.php', 1 => 'ssh2_sftp', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/ssh2/functions/ssh2-sftp-unlink.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL ssh2 >= 0.9.0)
ssh2_sftp_unlink — Delete a file
Deletes a file on the remote filesystem.
Ejemplo #1 Deleting a file
<?php
$connection = ssh2_connect('shell.example.com', 22);
ssh2_auth_password($connection, 'username', 'password');
$sftp = ssh2_sftp($connection);
ssh2_sftp_unlink($sftp, '/home/username/stale_file');
?>