Bir de bu kodları dener misiniz;
<?php
$fileName = 'test.txt';
$dosya = fopen($fileName, "r+") or die("Dosya Acilamiyor!");
while (!feof($dosya )) {
if ($oku = fgets($dosya )) {
$islem = fopen(trim($oku) . ".txt", "w+");
if($islem){
echo 'dosyalar olusturuldu! '."$oku.txt<br />";
}else{
echo 'bir hata olustu! Bu dosyalar oluşturulamadı : '."$oku.txt<br/>";
}
}
}
fclose($dosya );
?>
Hocam size zahmet bide txt dosyarının içine dosya ismini yazdıra bilirmiyiz ben bir kod buldum ama bi türlü yapamadım.