Thursday, 15 March 2012

javascript - pass a PHP object to an ajax PHP script -


How can I send PHP objects created during my initial page load into Ajax calls?

create-page.php creates my page and is an object expensive object . I have to pass expensive objects to ajax-some-stuff.php . Option 1: Will I attach the json_encode () object, its URL to it, by holding that part of my URL with Javascript, and return it to a PHG Ajax?

Option 2: Can I store it as $ _SESSION variable?

I will save it in $ _ session because it sends you Preventing data trough Internet which should only process on the server, there will be security issues as well as performance issues.

Depending on your object, you may need to apply the __ sleep () and __ wakeup () to this $ _ Session is

No comments:

Post a Comment