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://www.codercto.com/courses/l/5.html

查看所有标签

PHP and MySQL Web Development (3rd Edition) (Developer's Library

PHP and MySQL Web Development (3rd Edition) (Developer's Library

Luke Welling、Laura Thomson / Sams / 2004-09-29 / USD 49.99

We've taken the best and made it even better. The third edition of the best-selling PHP and MySQL Web Development has been updated to include material and code on MySQL 5, PHP 5 and on PHPs object mod......一起来看看 《PHP and MySQL Web Development (3rd Edition) (Developer's Library》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

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

RGB HEX 互转工具

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

URL 编码/解码