0
Google App Inventor在他们的文档中提供了一些使用python或app引擎设置示例TinyWebDB webservice的信息,但是,我试图使用php。这可能吗?我已经按照发布here方向,但我得到的是错误:如何使用php与App Inventors TinyWebDB组件进行通信?
Communication with the web service encountered a protocol exception
我的时候TinyWebDB1.WebServiceError
块上显示一个label
组件此错误。
所以这是我在我的PHP文件:
getvalue.php
header('Cache-Control: no-cache, must-revalidate');
header('Expires: Mon, 26 Jul 2010 05:00:00 GMT');
header('Content-type: application/json');
$retval = array("VALUE", "tagged", '"'.time().'"');
echo json_encode($retval);
将返回:
[ “价值”, “标记”, “\” 1283093117 \ “”]
setvalue.php
$tag = $_POST['tag'];
$value = $_POST['value'];
$retval = array("STORED", '"'.$tag.'"', '"'.$value.'"');
echo json_encode($retval);
将返回:
[ “存储”, “\” 标记\ “”, “\” TESTDATA \ “”]
感谢您的任何建议或答案。
我会踢自己,如果就这么简单,我怎么会错过了。如果它有效,将在今晚标出答案。 – shanabus 2011-01-24 13:10:04
我真的不记得是否是这样,但作为AppInventor不再可用,这是唯一的答案,我想我们可能会用明显的答案来关闭这个问题。 – shanabus 2012-03-01 04:37:31