【发布时间】:2021-12-07 19:33:20
【问题描述】:
我正在使用下面的代码,该代码在 android 手机上运行良好,但在 ios 上不运行。 在 ios 上实现这一目标的完美方法是什么?
$userAgent = $_SERVER['HTTP_USER_AGENT'];
if (strpos($userAgent, 'Instagram')) {
header('Content-type: application/pdf');
header('Content-Disposition: inline; filename= test');
header('Content-Transfer-Encoding: binary');
header('Accept-Ranges: bytes');
@readfile($file);
}
else{
header('Location: index.php');
}
我想在移动应用的外部浏览器上打开 index.php
【问题讨论】:
标签: php android ios mobile user-agent