Maison  >  Article  >  développement back-end  >  adaptive-images的使用方法 php 服务器端 图片处理相关工具

adaptive-images的使用方法 php 服务器端 图片处理相关工具

WBOY
WBOYoriginal
2016-07-28 08:27:561032parcourir

对应网页需填写 

nbsp;html>

html>

head>

    meta charset="UTF-8"> 

    title>网页title>

    script>document.cookie='resolution='+Math.max(screen.width,screen.height)+'; path=/';script> //重要

head>

body>

body>

html>

隐藏路由的文件里需要添加 

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php/$1 [L]

//注释部分重要代码

#

#  Options +FollowSymlinks

#  RewriteEngine On

#

#  # Adaptive-Images -----------------------------------------------------------------------------------

#

#  # Add any directories you wish to omit from the Adaptive-Images process on a new line, as follows:

#  # RewriteCond %{REQUEST_URI} !some-directory

#  # RewriteCond %{REQUEST_URI} !another-directory

#

#  RewriteCond %{REQUEST_URI} !assets

#

#  # Send any GIF, JPG, or PNG request that IS NOT stored inside one of the above directories

#  # to adaptive-images.php so we can select appropriately sized versions

#  RewriteRule \.(?:jpe?g|gif|png)$ adaptive-images.php

#

#  # END Adaptive-Images -------------------------------------------------------------------------------

#



这样配置下,手机掉用网页的时候服务器就会根据手机的分辨率输出对应的图片,客户端省流量

附带有对比图片, firefox  数据

以上就介绍了 adaptive-images的使用方法 php 服务器端 图片处理相关工具,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn