 |
Title: FTP Directory Marked Cool (Review this resource) Author: davidlo Posted On: 2004-12-20 Category: Home > PHP Functions
Popularity:
Description: Returns if the specified directory exists and is a directory
Total Hits: 729 Total Votes: 0
Total Points: 0 (0 reviews)
Page Navigation: [1]
FTP Directory
Introduction:
The function takes advantage of the fact that in order to change the working directory, the new one has to exist and has to be a
directory. After getting the return code from ftp_chdir, the function sets the current working directory to what it was before.
The source code is this:
<?php
function ftp_isdir($conn_id, $dir)
{
$curdir=ftp_pwd($conn_id);
$status=@ftp_chdir($conn_id, $dir);
ftp_chdir($conn_id, $curdir);
return $status;
}
?>
Page Navigation: [1]
|
|
 |