Manuel Pear

Net_FTP::checkFileExtension()

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

Synopsis

  1. <?php
  2. require_once 'Net/FTP.php
  3. ?> 

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).

Paramètres

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

Valeur retournée

int - either FTP_ASCII or FTP_BINARY.

Valeurs renvoyées

No errors. Always a filetransfermode should be returned.

Note

Cette fonction ne peut pas être appelée de façon statique.

Exemple

Exemple 54-1. Using checkFileExtension()

  1. <?php
  2.    
  3.    var_dump($test->checkfileextension('foo/bar.zip')); 
  4.    
  5.  
  6. ?> 

Remonter Remonter
L'éditeur javascript - CSS - Gentoo - Tutoriaux PHP - Tutoriels PHP - Bretagne - php - Moto - Kit graphique