PHP ftp_site() 函数

PHP 教程 · 2019-01-26 13:26:37

定义和用法

The ftp_site() 函数向 FTP 服务器发送 SITE 命令。

SITE 命令没有标准化,在不同的服务器上不尽相同。对于处理文件权限或组关系方面的事情,SITE 命令很有用。

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

语法


ftp_site(ftp_connection,command)


参数 描述
ftp_connection 必需。规定要使用的 FTP 连接。
command 必需。规定向 FTP 服务器发送的 SITE 命令。

提示和注释

提示:如需查看哪些命令可用,请通过 ftp_raw() 函数发送 REMOTEHELP 命令。

实例


<?php
$conn = ftp_connect("ftp.testftp.com") or die("Could not connect");
ftp_login($conn,"admin","ert456");
ftp_site($conn,"CHMOD 0600 sitetest.txt");
ftp_close($conn);
?> 


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

查看所有标签

The Joy of X

The Joy of X

Niall Mansfield / UIT Cambridge Ltd. / 2010-7-1 / USD 14.95

Aimed at those new to the system seeking an overall understanding first, and written in a clear, uncomplicated style, this reprint of the much-cited 1993 classic describes the standard windowing syste......一起来看看 《The Joy of X》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具