View Full Version : Passing the ' and \ characters to php
idpexec
04-03-2004, 02:15 AM
Been working for days trying to figure out why I'm getting an error returned to flash from a php script.
Finally I found that the ' and \ characters are causing the problem. If I double up on them like '' or \\ everything works fine.
Is there a reason for this? Is there a simple solution?
Thanks,
Ward
splict
04-03-2004, 04:32 AM
The backslash is used to escape special characters such as \' \" \\ \r and \n. "doubling up" is the solution, thats what its for. You can use other methods such as encode() for a lot of characters, but you will still need to esape backslashes \
-splict
Ruben
04-03-2004, 07:48 AM
Not sure, but when you load a txtfile using loadVariablesNum() codes are often used for non-plaintext...
For instance, if you'd have some text like this:
I'm getting sick and tired of not being able to use \ and '
Then you might want to try encoding the text like this:
I'm getting sick and tired of not being able to use %5C and %27
You've probably seen it before when you visited a URL with a space in it. If you'd have a file called "some file.html" on your domain and you'd type "http://www.somedomain.com/some file.html" in your browser then the url in the adress-field would automatically turn into "http://www.somedomain.com/some%20file.html". "%20" stands for a space...
If you want more info on this one: visit this site (http://www.permadi.com/tutorial/flash4readtext) and check ASCIITable.com (http://www.asciitable.com)[the '%' values are in the 'Hx'-colom].
Good luck - Ruben
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.