Skip to main content
Inspiring
June 11, 2021
Question

Passing a path string to PHP as3

  • June 11, 2021
  • 1 reply
  • 911 views

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 has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
June 12, 2021

in as3:

 

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

 

in php

 

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

nezarovAuthor
Inspiring
June 12, 2021

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?

kglad
Community Expert
Community Expert
June 12, 2021

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.