PHP ftp_delete() 函数

PHP 教程 · 2019-01-26 07:28:04

定义和用法

ftp_delete() 函数删除 FTP 服务器上的一个文件。

如果成功,该函数返回 TRUE。如果失败,则返回 FALSE 和一个警告。

语法


ftp_delete(ftp_connection,file)


参数 描述
ftp_connection 必需。规定要使用的 FTP 连接。
file 必需。规定要删除的文件的路径。

实例


<?php
$conn = ftp_connect("ftp.testftp.com") or die("Could not connect");
ftp_login($conn,"admin","ert456");
echo ftp_delete($conn,"test.txt");
ftp_close($conn);
?> 

上面的代码将输出:


1


点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html

查看所有标签

Charlotte's Web

Charlotte's Web

E. B. White / Puffin Classics / 2010-6-3 / GBP 6.99

This is the story of a little girl named Fern who loved a little pig named Wilbur and of Wilbur's dear friend, Charlotte A. Cavatica, a beautiful large grey spider. With the unlikely help of Templeton......一起来看看 《Charlotte's Web》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

URL 编码/解码
URL 编码/解码

URL 编码/解码

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具