wp_filesize

FUNCTION wp-includes\functions.php (ligne 3576) github
Filters file type based on the extension name.

Paramètres

Entrée :
$path
Sortie :
@param array[] $ext2type Multi-dimensional array of file extensions types keyed by the type of file.
@param string $path Path to the file.
@return int The size of the file in bytes, or 0 in the event of an error.

Utilisation

// Utilisation de la fonction wp_filesize
$result = wp_filesize($path);

if ($result) {
    // Votre logique ici
}

Actualités

Chargement des actualités...