Skip to main content
Inspiring
Jun 11, 2021 5:50 PM UTC
Question

Passing a path string to PHP as3

Hello 

I am trying to send a path string to a php file but it needs to be encoded before.. so anyhow? thanks.

The path in as3: "D:\Graphics\Digital\Marketing-02.jpg"

In php it comes without "\": "D:GraphicsDigitalMarketing-02.jpg" 

This topic is closed to new replies. Start a new post to keep the conversation going.

14 replies

kglad
Community Expert
Community Expert
Jun 12, 2021 1:05 PM UTC

in as3:

 

sendpathstring.split("\").join("@");

 

in php

 

receivepathstring = implode("\",explode("@",sendpathstring));

Translate
nezarovAuthor
Inspiring
Jun 12, 2021 5:33 PM UTC

Thanks for your responding

Actually the proplem is in the string in actionscript, when I trace the string "D:\Graphics\Digital\Marketing-02.jpg" the output shows this resault: D:GraphicsDigitalMarketing-02.jpg

Any idea?

Translate
kglad
Community Expert
Community Expert
Jun 12, 2021 5:37 PM UTC

yes, replace the back slash (an as3 escape character) with something else as suggested.  exactly how you do that (and where you do that) deepends on how/where the string is created.

Translate