我正试图从Jquery Ajax
获得价值,但它没有得到。
问题出在下面的代码中:
<?php
header('Content-Type: application/json');
if(isset($_GET['od'])){
$deotd = $_GET['od'];
}
date_default_timezone_set('Asia/Calcutta');
$cdate = date('Y-m-d H:i:s ', time());
$scdate = strtotime($cdate);
$e = $scdate - $deotd;
$f = "2700" - $e;
// You would calculate a real value here
echo json_encode([
'tleft' => $f
]),
json_encode([
'diffex' => $e
]);
?>
深入问题是:
echo json_encode([
'tleft' => $f
]),
json_encode([
'diffex' => $e
]);
但问题是什么,我无法解决。