-
FAQ
- Forum Search
- Community
- Online Manual
- Support Helpers of the Month
- Function Database
ftp_connection::chmod
Description
Chmods the specified file to the specified value.
Syntax
bool ftp_connection::chmod (string $ftp_file, int $chmod)
Parameter $ftp_file
Expected type: String
Description: The name of the file/folder to chmod
Parameter $chmod
Expected type: Integer
Description: The desired chmod value (example: 0777)
Return value
Expected type: Boolean
Description: True if the command was successful, false otherwise
Notes
- Example: $package_ftp->chmod('myfile.txt', 0666);
- Sends the SITE CHMOD command to the FTP server
- Converts $chmod from octal (0777) to text ("777")
- Checks for a valid connection before continuing
- Checks for a 200 response code (Command ok).
- Sets a 'bad_file' error if the command wasn't successful
- Returns false if there wasn't a valid connection or the command was unsuccessful
Advertisement:- Help | Terms and Rules | Go Up ▲
- Copyright © 2022 Simple Machines. All Rights Reserved.
- Page created in 0.019 seconds with 13 queries.
- Forum Search