PHP
snowpape
-
fathy47 Messages postés 1936 Date d'inscription Statut Membre Dernière intervention -
fathy47 Messages postés 1936 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
je vourais kon mexplique cette ligne if(substr($fichier,-4)==".php"), je n'y comprend rien
<?php
$pf=fopen("compilation.text","w+") or die("Fichier non créé");
echo "Le fichier est créé<br/>";
$dir=opendir('.');
while($fichier=readdir($dir))
{
if(substr($fichier,-4)==".php")
{
fputs($pf,"$fichier\n");
}
}
echo "Les fichiers .php ont été ajouté dans compilation.txt";
fclose($pf);
closedir($dir);
?>
merci
je vourais kon mexplique cette ligne if(substr($fichier,-4)==".php"), je n'y comprend rien
<?php
$pf=fopen("compilation.text","w+") or die("Fichier non créé");
echo "Le fichier est créé<br/>";
$dir=opendir('.');
while($fichier=readdir($dir))
{
if(substr($fichier,-4)==".php")
{
fputs($pf,"$fichier\n");
}
}
echo "Les fichiers .php ont été ajouté dans compilation.txt";
fclose($pf);
closedir($dir);
?>
merci
A voir également:
- PHP
- Easy php - Télécharger - Divers Web & Internet
- Expert php pinterest - Télécharger - Langages
- Retour a la ligne php - Forum Webmastering
- Alert php - Forum PHP
- Retour a la ligne php ✓ - Forum PHP