Hi all. i have a little problem writing dynamic value to a ram.txt file. I want write the following infor int a text file:
The song path for each song id i pass.
<player showDisplay="yes" showPlaylist="yes" autoStart="yes">
are written once at the start and end of the text file.The title is just the name of song without .mp3 extention.
Currently when i call the code like this:
the only information which is get written to text file is the url but i want write song path and title in above mention format.
I be happy if an expert help me here.Thanks
$url = "http://localhost/flash_mp3_player/mp3/08 - Track 8.mp3";
$url = "http://localhost/flash_mp3_player/mp3/13 - Gar Aya.mp3";
$url = "http://localhost/flash_mp3_player/mp3/Soroush - Yeh Donya - 02 Shoghe Nafas.mp3";
$mycontent = "";
$allsid = explode (",",$_GET["sid"]);
$mycontent = array();
foreach ($allsid AS $value)
$mycontent = $url[$value];
$handle = fopen ("ram.txt","w+");
if (fwrite ( $handle,implode("\r\n",$mycontent)."\r\n") )
echo "FILE IS WRITTEN SUCCESSFULLY";
echo "ERROR IN WRITING TO FILE";
echo "ERROR IN OPENING FILE";