根据屏幕分辨率获取图像
Possible Duplicate:
how to get user's screen resolution with PHP
Hy there,
is it possible to get the screen resolution of the user (maybe by php) and than call an if function to set up an image path in javascript related to this resolution?
Thx Sammy
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
PHP 不知道用户的屏幕分辨率,但您当然可以使用 Javascript 来检测它。例如,像下面这样的东西?
其中dynamicResolutionImage.php是一些生成给定大小的图像的脚本。
PHP doesn't know about the user's screen resolution, but you can of course use Javascript to detect it. Something like the following, for instance?
Where dynamicResolutionImage.php is some script that generates an image with the given size.