SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Apr 2003
    Location
    Twin Cities
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I need help with a simple text file import!!

    I am importing a text file into a flash 5 movie, and when I view the movie, there is a / character placed before each ' character in the movie. You can see this at www.bound-by-honor.net/journal.swf

    I am importing the text using this method:
    http://www.gurusnetwork.com/tutorial...oll_text2.html

    Can anyone offer me some assistance? I assume that the flash movie is reading each ' character as part of the syntax, how do I stop that from happening...? All I want is to have the band just have to update text files to update their website.

    Help!!!

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Where is the data coming from? A database? Seems like maybe the data came from a database with the quotes escaped? Can you confirm?

  3. #3
    SitePoint Member
    Join Date
    Apr 2003
    Location
    Twin Cities
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Whoa, you're good... Yes, the .txt file is coming from a database... I pulled the actual text file off the server through ftp and it had the / characters in the .txt file already, so we know it's not the flash movie that's adding those now.. That means that the database is adding the /'s before each ' character?

    Thanks for your help!

  4. #4
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thats correct, let me guess its a MySQL database? Let me guess you used an html form to allow the user to update the text. So when the form is submitted you probably have magic_quotes_gpc set to On in your PHP configuration. You can check that with a phpinfo() in a blank php script. Anyways, you need to use PHP to retrieve the data from the database and send it back to flash. After retrieving it from the database you need to run stripslashes() on the text.

    Let me know if that makes sense.

  5. #5
    SitePoint Member
    Join Date
    Apr 2003
    Location
    Twin Cities
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Gotcha... I'll look into that tonight at home... Can't tell you how nice it was of you to help me out...

  6. #6
    SitePoint Member
    Join Date
    Apr 2003
    Location
    Twin Cities
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That fixed it.... freddydoesphp for President!!!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •