douzong5473 2013-05-06 16:05
浏览 59

如何使用资源ID创建资源?

When I used proc_open, it returns a resource handle represented as Resource id #4. This code runs on the server, and I want to use this 'handle' again using the id. But after some kind of data transfer between the client and the server, all I got is the resource's id, Resource id #4, instead of the pointer.

Is is possible to recreate the resource with the only id?

  • 写回答

1条回答 默认 最新

  • douyan1972 2013-05-06 16:09
    关注

    No, this could never reliably work, because in a new request you have no clue whether the resource is even still accessible - in a preforked environment like Apache the second request might be executed by a completely different process, in which accessing the same resource would be impossible on the OS level. Also, in a clustered and/or load balanced environment the second request could even end up on a completely different server.

    评论

报告相同问题?