我有一个php页面,它返回一个简单的整数。我正在使用html <object>
标记来调用此页面。我得到了结果,但我不能通过改变大小,颜色等来格式化它。
php的例子:
$url = 'https://mydomain/execute.json';
$request = $url;
$ch = curl_init();
$timeout = 5;
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json'));
curl_setopt($ch, CURLOPT_URL, $request);
curl_setopt($ch, CURLOPT_USERPWD, "fih@XXXXXXXXXXXXX);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$json_data = curl_exec($ch);
curl_close($ch);
$data1 = json_decode($json_data, true);
$data1 = $data1['rows'];
echo count($data1);
?>
我将这个php文件称为:
<html>
<body>
<span style="font-size:500%"><object width="400" height="400" data="http://anotherdomain/ikketildelte.php"></object></span>
</body>
</html>
结果是整数,但样式不受影响。
Chrome开发者工具显示它嵌入在#document标记中:
任何人都知道如何格式化此结果?