Manuel Pear

Net_FTP::size()

Net_FTP::size() -- returns the size in bytes of a file.

Synopsis

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

mixed Net_FTP::size (string $file)

Description

gives you the size of a file bytes.

Paramètres

  • string $file - The file to check.

Valeur retournée

mixed - the size of the given file on success, otherwise PEAR::Error.

Valeurs renvoyées

The returned PEAR_Error object in case of an error is unspecific. You can ignore the errornumber and errormessage, because only "Connection failed" will be returned if the connection fails.

Note

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

Exemple

Exemple 54-1. Using size()

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

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