PHP 教程 PHP 表单 PHP 高级教程 PHP 数据库 PHP XML PHP 与 AJAX PHP 参考手册

发布于 2016-11-18 14:28:35 | 53 次阅读 | 评论: 0 | 来源: 网络整理


定义和用法

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 


最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务