Quote:
Originally Posted by uno
some code that would also contain the name of the file-ext. in the file.
|
ok well heres how you do it in php
make a folder somewhere
put the code below in a file called index.php
make a folder called results. this is where the created files willl be saved ( chmod the folder to be writeable )
save the list in a file called file.txt ( in the same folder as index.php )
Code:
<?php
$fil = "file.txt";
$sc = file_get_contents($fil);
$emt = explode("\n",$sc);
foreach( $emt as $pn => $mub){
$dub = str_replace(" ","-",$mub);
$wrt = "STUFF INSIDE FILE $dub.txt";
$fol = "results/$dub.txt";
echo "Saved $dub.txt \n<br>";
$hn = fopen($fol, 'w+');
fwrite($hn, $wrt);
fclose($hn);
}
?>