What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » PHP Help

PHP Help
Author: Message:
WDZ
Former Admin
*****

Avatar

Posts: 7106
Reputation: 107
– / Male / Flag
Joined: Mar 2002
RE: PHP Help
So the problem is at the fwrite() line, right? If you want to have double quotes (") inside a string that's enclosed by double quotes, you need to escape all the quotes in the string. For example:
code:
fwrite($fp, "<ASX version = \"3.0\">

<TITLE>Xplode Radio</TITLE>
<Entry>
<Ref href = \"$files\" />
<Ref href = \"../media/Light of the Dark.mp3\" />
<Ref href = \"../media/Tranced.mp3\" />     
</Entry>

</ASX>");

(Note the escape character (backslash) before the " characters)

About the new lines: if you see all the lines together with strange symbols where they should break, it's possible that the file is being created in UNIX format, and your text viewer doesn't support it. Try using binary mode when you upload the PHP script to your server... that should keep the Windows-style line breaks. If that doesn't work, you could change that piece of code again to this:
code:
fwrite($fp, "<ASX version = \"3.0\">\r\n\r\n<TITLE>Xplode Radio</TITLE>\r\n<Entry>\r\n<Ref href = \"$files\" />\r\n<Ref href = \"../media/Light of the Dark.mp3\" />\r\n<Ref href = \"../media/Tranced.mp3\" />\r\n</Entry>\r\n\r\n</ASX>");
05-20-2004 04:41 AM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
PHP Help - by DJeX on 05-20-2004 at 01:02 AM
RE: PHP Help - by WDZ on 05-20-2004 at 04:41 AM
RE: PHP Help - by DJeX on 05-22-2004 at 06:17 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On