Mobile site fails to load on ipad from chrome safari

时间:2015-05-12 23:16:00

标签: php android ios iphone ipad

I have some code at the front of my index.php file that calls out to a mobile detect php. It was working fine on iPhone and Android and iPad until one of the more recent ios updates... 8.0 .1 or maybe .2. The code seems to try to forward to the flash page.

It still continues to work on Android and iPhone iOS 7. if possible can someone help me figure out what to change in order to get this script to work with the newer versions of iOS.

Dictionary<int, string> specialNumberNames = new Dictionary<int, string>()
{
   {1, "First"},
   {2, "Second"},
   ...
}

int number = 1;
string specialName = specialNumberNames[number];

1 个答案:

答案 0 :(得分:1)

我建议使用https://github.com/serbanghita/Mobile-Detect/

定期添加更新,人气确保了未来移动设备的发展势头。