Jump to content

PHP - Flash and External Text File


vinchenzison

Recommended Posts

Hi,

I have a slight problem but am fairly new to PHP so could do with your help.

 

I have a flash movie that loads a text file to display text in dynamic text fields.

I have created a PHP page to be able to edit this text file.

The editing works fine but when writing to the text file I was getting slashes before quotes.

I fixed this by using the slashquotes function.

 

The problem I have now is I need to use the & in the text but those of you who know flash will know that this is the symbol to start a new variable in the text file thats imported.  I've tried using & but when updating the text file it gets converted to just & therefore flash thinks it's the start of a new variable.

 

Anyone know how I can get around this?

I suppose I need PHP to update with & but I also need the very first & to actually be & so flash knows it's a variable.

 

Thanks

 

Vin

Link to comment
https://forums.phpfreaks.com/topic/103373-php-flash-and-external-text-file/
Share on other sites

I think I may have solved my problem by taking a different apraoach .

Instead of getting flash to load a text file, I'll get it to load a php file instead.

I will remove &variable= from my text file and use something like

$newString = str_replace("&", "&amp",$myStrippedSlashedString);

after the stripslashes have happened when updating the file to fix &

The php file can then output the textfile and add &variable= to the beginning creating what I need.

;D

 

I'm unable to test this yet but will tonight (Unless GTA has arrived  ;) )

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.