File "extraction_nom_ficiher_ftp_raw02.php"
Full Path: /home/analogde/www/Python/Monsta-FTP-master/extraction_nom_ficiher_ftp_raw02.php
File size: 345 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
$chaine = '-rw----r-- 1 3312 users 384260 Nov 25 20:02 xxx_2024-06-25 22_04_22_.jpg';
// Expression régulière pour détecter la portion contenant le point (.)
preg_match('/\S+\.\S+/', $chaine, $matches);
// Le résultat est maintenant dans $matches[0]
$fichier = $matches[0];
echo "Nom du fichier : $fichier\n";
?>