Janne October 6th, 2016 Wade editor load json data perfectly if its load from local folder ( wade online engine ), but if I try to load data from my own web server, it aler "unable to load json file...". It doesent work in wade online editor, but when I move game files to my server, it works fine.
Question is, is it possible to load json data from other server in wade online editor, it will help a lot to use faster game editor. Thanks!
Janne December 21st, 2016 I will test that jQuery.post() if it work.
$_REQUEST contect in just some charecters, not include special charecters, only letters.
Gio December 21st, 2016 I still don't have a php server handy, but my colleague (who is much better at php than me) says that, because the data is in the body of the POST request, it may not be available simply through $_REQUEST, but you may have to do
$data = file_get_contents('php://input');
Janne December 22nd, 2016 I try that before and it brings some data with it. When I json_decode it:
$var = json_decode(file_get_contents('php://input'), true);
result of $var is "array" and its content count is 1.
I try to get data from array, but I dont know how? Is there any good and simple trik to get content from that array?
It will help if I know what is construct of this array, what kind of array wade will construct when it post it from wade.
Thank you a lot for helping with this case.
Gio December 22nd, 2016 I think your object will be in $var['data']
However if you just do var_dump($var) you should be able to see what's inside.