A way to determine browser width in PHP without javascript?
问题 First off is there one? Or would I have to use javascript? I'd like to be able to make changes to which CSS is used, so frex I could load smaller fonts for a mobile device, or whatever. 回答1: There is no way to do this. If you want to detect what device is being used then you should examine $_SERVER['HTTP_USER_AGENT'] for clues. 回答2: Unfortunately there is no way to detect the users resolution with PHP only. If you use Javascript, you could set this value in a cookie, and all subsequent