Saturday, 8 January 2011

adobe flex AS3.0 Flex & php - how to make a string url compatible

environment: adobe flex AS3.0 Flex & php

problem: how to make a string url compatible, how to convert illegal and problematic characters

solution:

in actionscritp, use: escape() & unescape()
guide: http://www.adobe.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary199.html
guide: http://www.adobe.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary812.html
example: http://www.adobe.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary812.html

in php, use: urlencode() & urldecode()
note!  you should encode or decode the whole url string but only areas where are contains incompatible string.

guide: http://php.net/manual/en/function.urlencode.php
guide: http://www.php.net/manual/en/function.urldecode.php

No comments:

Post a Comment