Home > Backend Development > PHP Tutorial > ftp_get_option() function in PHP

ftp_get_option() function in PHP

WBOY
Release: 2023-08-27 11:34:01
forward
1009 people have browsed it

ftp_get_option() function in PHP

The ftp_get_option() function returns the runtime options for the FTP connection.

Syntax

ftp_get_option(con,option);
Copy after login

Parameters

  • con - FTP connection.

  • < strong>#option - The runtime options to return.

    The following are possible values ​​-

    • FTP_TIMEOUT_SEC - Timeout used for network operations

    • FTP_AUTOSEEK - If this option is enabled, Returns TRUE, otherwise returns FALSE

Return

ftp_get_option() function returns a value when successful, if the given option is not supported, it returns FALSE.

Example

The following is an example -

<?php
   $ftp_server="192.168.0.4";
   $ftp_user="amit";
   $ftp_pass="tywg61gh";
   $con = ftp_connect($ftp_server) or die("Could not connect to $ftp_server");
   $login = ftp_login($con, $ftp_user, $ftp_pass);
   echo ftp_get_option($con,FTP_TIMEOUT_SEC);
   ftp_close($con);
?>
Copy after login

The above is the detailed content of ftp_get_option() function in PHP. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template