- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
ftp_get_option() function in PHP
The ftp_get_option() function returns runtime options of the FTP connection.
Syntax
ftp_get_option(con,option);
Parameters
con − The FTP connection.
option − The runtime option to return.
The following are the possible values −
FTP_TIMEOUT_SEC - The timeout used for network operations
FTP_AUTOSEEK - Returns TRUE if this option is on, FALSE otherwise
Return
The ftp_get_option() function returns the value on success, or FALSE if the given option is not supported.
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); ?>
Advertisements