Net_FTP::checkFileExtension()

Net_FTP::checkFileExtension() – check extensions.ini for the transfermode of a specific file.

Synopsis

require_once 'Net/FTP.php';

integer Net_FTP::checkfileextension ( string $filename )

Описание

This method checks a given filename for its proper transfermode (using extensions.ini). If the file extension can not be found, the class falls back to the standard transfer mode (attribute).

Parameter

  • string $filename - The filename to check extension for.

Return value

int - either FTP_ASCII or FTP_BINARY.

Throws

No errors. Always a filetransfermode should be returned.

Замечание

This function can not be called statically.

Пример

Using checkFileExtension()

<?php
     
    var_dump
($test->checkfileextension('foo/bar.zip'));
    
?>
    Поддержать сайт на родительском проекте КГБ