PHP ftp_pwd() 函数

PHP 教程 · 2019-01-26 11:44:21

定义和用法

ftp_pwd() 函数返回指定 FTP 连接的当前目录名称。

语法


ftp_pwd(ftp_connection)


参数 描述
ftp_connection 必需。规定要使用的 FTP 连接。

实例


<?php
$conn = ftp_connect("ftp.testftp.com") or die("Could not connect");
ftp_login($conn,"admin","ert456");
// print current directory
echo ftp_pwd($conn) . "<br />";
// change directory to images
ftp_chdir($conn,"images");
// print current directory
echo ftp_pwd($conn);
ftp_close($conn);
?>

上面的代码将输出:


/
/images


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

查看所有标签

iGen

iGen

Jean M. Twenge PhD / Atria Books / 2017-8-22 / USD 27.00

A highly readable and entertaining first look at how today’s members of iGen—the children, teens, and young adults born in the mid-1990s and later—are vastly different from their Millennial predecesso......一起来看看 《iGen》 这本书的介绍吧!

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

HTML 编码/解码

SHA 加密
SHA 加密

SHA 加密工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具