删除一个文件
bool Core_Ftp::delete_file( string $filepath )
参数列表
参数 类型 描述 默认值 $filepath
string
bool
public function delete_file($filepath)
{
if (!$this->_is_conn())
{
return false;
}
$result = @ftp_delete($this->_conn_id, $filepath);
if (false===$result)
{
if (IS_DEBUG)
{
Core::debug()->error(__('ftp unable to delete'));
}
return false;
}
return true;
}