|
Posted by Jeff North on 11/11/05 01:34
On Wed, 09 Nov 2005 22:45:54 GMT, in comp.lang.php Richard Ragon
<bsema04@hananho.com> wrote:
>| I'm a flash applications developer. I'm working with a PHP developer
>| who is working on a back end database. His PHP program writes a small
>| blob with a sting of comma delineated variables. It looks like this..
>|
>| 'Air Conditioning,Included,Included,Power
>| Steering,Included,Included,Power Windows,Included,Included,Power Door
>| Locks,Included,Included,Tilt Wheel,Included,Included'
>|
>| I suspect there's a problem on how his PHP writes this string, because
>| my program (flash windows based) is having a problem trying to read the
>| strings last variable "Included".
>|
>| I used SQLYOG, a Windows based SQL editor to take a look at the string
>| in the blob, and I can see an unidentifiable character at the end of the
>| string.. windows can't see it, but it looks like a | at the end of the
>| string in the blob db.
All this means is that the font you are currently using can not
display the character.
>| Is this a line return? How do we get rid of this l/f or return from
>| showing up via windows?
>|
>| What needs to be in the PHP code in order NOT to put a l/f or return here??
What version of Flash are you using?
Use the following to obtain the code you are looking for (AS2.0 code):
---------------------------------------------------
var my_lv:LoadVars = new LoadVars();
my_lv.onLoad = function(success:Boolean):Void {
if (success) {
trace(this);
} else {
trace("Error");
}
}
my_lv.load("lv.txt");
-----------------------------------------------------
change the "lv.txt" to that of your filename.
The output window will show the URL encoded string that is read. If
the last character is a linefeed then you'll see %0D as the last
character of the output.
From there you could expand your if( success ) function to:
if( success ) {
my_lv = my_lv.substring(0,my_lv.length-1);
//--- do more processing
}
---------------------------------------------------------------
jnorthau@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------
[Back to original message]
|