![]() |
Splitting a .txt file into lines
Basically, what I want to do, is to open a file (it's a .pls file but can be read by notepad) and split each line of it into an array, so I can use that array. I'm totally stumped on where to with this, what should I do? Could somebody help me?
|
|
Quote:
But, there is a way to load the lines of a file into an array (I am not sure if it works with .pls, but if it opens in notepad it probably will). Try something like: PHP Code:
|
file extension doesn't matter, you can .loadlines() a .exe file, and it would still work, just wouldn't get the data you'd think you would.
|
Quote:
|
Quote:
|
Quote:
Quote:
|
You can load pretty much any file with loadlines. I have used it many time to aod the contents of .nw files to add level links and stuff.
|
Yeah, it works. I'm scripting a play class that'll open .aac files, as 24k is much more friendly for the people on 126k who lag when 96k .pls starts playing. Thanks for the help.
|
One last thing, does loadlines load from a url if I specify that as the file, or do I need to have it saved as a var through requestURL for it to work?
|
Rephrase your question. It's... Confusing.
|
There was an example here: http://forums.graalonline.com/forums...ad.php?t=64166
It is loading a playlist, but you can also load other files, just modify the onData function (and remove onTimeout and onMusicDataReceived). |
| All times are GMT +2. The time now is 10:45 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.