【发布时间】:2015-06-16 18:39:16
【问题描述】:
我有两个 android 独立的应用程序将数据发送到 php(xampp) 服务器。我正在从 app1 向 test1.php 和从 app2 向 test2.php 发送数据。之后,我想使用会话从 test1.php 访问数据并在 app2.php 中做一些事情。我成功地从我的 android 应用程序发送数据。但我没有得到 test2.php 中的数据。这是test1.php。
<?php
//session
session_start();
$json = file_get_contents("php://input");
$jsondecoded = json_decode($json, TRUE);
$Id = $jsondecoded['ID'];
$_SESSION['id'] = $Id;
?>
这里是test2.php
<?php
//session
session_start();
$myid=$_SESSION['id'];
?>
【问题讨论】: