等待www级通话时冻结

时间:2015-02-01 22:16:37

标签: c# php unity3d

当我从php文件中通过www类接收某些字符串时,我遇到了问题。在php结束时,我回显一个字符串,一些字符串冻结了进行WWW调用的Unity脚本(Unity 4.6.0)。如果我从浏览器调用php文件(直接url地址),那么它永远不会出现任何问题。字符串总是很好。

我想要回显的字符串是json_encode的结果,但这无关紧要。在我的调试模式中,我创建了一个看起来像json_encoded字符串的字符串。然后我尝试了不同版本的字符串,看看哪些版本冻结了调用应用程序。所以php代码的结尾如下:

$matches = 'one string’;
echo $matches;

请参阅下面我尝试的不同字符串($ matches)。 不工作=这个字符串冻结了调用应用程序; WORKS =使用此字符串成功完成AJAX调用,应用程序接收数据并继续

$matches = '[{"Start":"2015-02-02 08:00:00","Duration":"15","nSituations":1}]'; // DOES NOT WORK
$matches = '[{"Start":"2015-02-02 08:00:00","Duration":"15"}]'; // WORKS
$matches = '[{"Start":"2015-02-02 08:00:00","nSituations":1}]'; // WORKS
$matches = '[{"Duration":"15","nSituations":1}]'; // WORKS
$matches = '[{"Start":"A","Duration":"15","nSituations":1}]'; // WORKS
$matches = '[{"Start":"2015-02-02 08:00:00","Duration":"15","nSituations":"1"}]'; // DOES NOT WORK (notice nSituations as STRING)
$matches = '[{"Start":"2015-02-02","Duration":"15","nSituations":"1"}]'; // DOES NOT WORK
$matches = '[{"Start":"08:00:00","Duration":"15","nSituations":"1"}]'; // DOES NOT WORK
$matches = '[{"Start":"08:00:00","Duration":"15","nSituations":1}]'; // DOES NOT WORK (nSituations back as INT)
$matches = '[{"Start":"2015-02-02 08:00:00"}]'; // WORKS

我看不到任何模式。有谁知道这里发生了什么? 有this older post,但它没有帮助我,我不这么认为。

0 个答案:

没有答案