选择语言 :

 Core_Ftp::delete_file

删除一个文件

bool Core_Ftp::delete_file( string $filepath )

参数列表

参数 类型 描述 默认值
$filepath string
返回值
  • bool
File: ./core/classes/ftp.class.php
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;
}