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 )

Description

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.

Note

This function can not be called statically.

Example

Using checkFileExtension()

<?php
     
    var_dump
($test->checkfileextension('foo/bar.zip'));
    
?>
upload a whole directory to the FTP server. (Previous) Net_GameServerQuery (Next)
Last updated: Wed, 22 Oct 2014 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report or add a note.
View this page in:

User Notes:

There are no user contributed notes for this page.