开发者

Is it possible to access php $_SESSION variables in a cgi/ruby script?

开发者 https://www.devze.com 2023-03-15 07:22 出处:网络
Title pretty much speaks for itself.Is there a simple way to do this?I was thinking of just writing the data stored in the session variable to a temp file then having the ruby script read the data fro

Title pretty much speaks for itself. Is there a simple way to do this? I was thinking of just writing the data stored in the session variable to a temp file then having the ruby script read the data from the file,开发者_高级运维 but that seems kind of dumb. Is there a better way to do this?


This question seems to have been already addressed: Sharing a session between Ruby and PHP


IMHO, the cleanest mechanism would be to write a custom PHP session handler that:

  • Stores data to a database (rather than files)
  • Serializes data to a format known by Ruby, possibly JSON
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号