|
|
|
|
![]() ![]() |
Jul 8 2007, 07:02 PM
Post
#1
|
|
|
Member [Level 1] ![]() ![]() ![]() ![]() Group: Members Posts: 65 Joined: 7-July 05 Member No.: 9,139 |
Hi I am trying to make a script so that i can insert songs into a playlist, but i need a script in which it opens the playlist file and removes the closing tag at the end, so before i can add more entrys.
e.g CODE <atx> <entry>Location 5</entry> <entry>Location 4</entry> <entry>Location 3</entry> <entry>Location 2</entry> <entry>Location 1</entry> <atx> But to add more entrys i would have to get rid of the atx, then use the fputs to place the new entry into the file. |
|
|
|
Jul 8 2007, 09:56 PM
Post
#2
|
|
|
A clever man learns from his own mistakes, a WISE man learns from those of OTHERS ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 884 Joined: 12-April 06 From: Essex, UK Member No.: 21,719 |
Well i would read the contents of the file into a variable then use strreplace on it to find the atx part and replace it with "" which is nothing, then add the content i wanted and add the atx at the end of it all.
make sense? |
|
|
|
Jul 9 2007, 08:18 PM
Post
#3
|
|
|
Member [Level 1] ![]() ![]() ![]() ![]() Group: Members Posts: 65 Joined: 7-July 05 Member No.: 9,139 |
Well i would read the contents of the file into a variable then use strreplace on it to find the atx part and replace it with "" which is nothing, then add the content i wanted and add the atx at the end of it all. make sense? Thankyou I managed to remove the atx at the end of the document and insert new songs then insert the atx again to close the document off. Ty Rob |
|
|
|
Jul 9 2007, 09:22 PM
Post
#4
|
|
|
A clever man learns from his own mistakes, a WISE man learns from those of OTHERS ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 884 Joined: 12-April 06 From: Essex, UK Member No.: 21,719 |
Glad to hear it! I hate being stumped by code that just seems impossible, its usually not though, well unless its my code in which case i might as well just give up!
|
|
|
|
Feb 23 2008, 09:29 AM
Post
#5
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 387 Joined: 9-February 08 Member No.: 57,615 |
What is atx? Could you explain wider, for what I can use it?
|
|
|
|
Apr 8 2008, 05:14 AM
Post
#6
|
|
|
Member [Level 1] ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 65 Joined: 7-April 08 From: Toronto, Canada Member No.: 60,502 |
Yes what is atx is it some thing like you can add attatchments to? Please explain me . I want to make a BB type thing in PHP.
Oh by the way if you finish making the Playlist Script then could you please forward me the source so that I can put it in my BB. I have the working version ready, just need to do the visual themes and other decorative stuff now so the Playlist Script will be a great addon on my BB. Could you please list the features that it supports. Dave ****Thanks in adv**** |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 20th July 2008 - 08:24 PM |