hello
i was creating a script who will read a text file and create mp3 files from lines name , but i had a problem , php wont write php files it give me this warnning message
Warning: rename(0.txt,Aa Gale Lag Ja - Tera Mujhse Hai .mp3): Invalid argument in c:\gamesrecord\000\mpror.php on line 21
this is my code :
<?php
$lines = file('file.txt');
$l_count = count($lines);
for($x = 0; $x< $l_count; $x++)
{
$po = $lines[$x] ;
$ourFileName = "$x.txt";
$ourFileHandle = fopen($ourFileName, 'w') or die("can't open file");
fclose($ourFileHandle);
rename("$x.txt","$po.mp3");
echo $ourFileName ;
}
?>
pls help
and thank you ;)