找回密码
 立即注册
PHP编程 2023-02-05 112 0star收藏 版权: . 保留作者信息 . 禁止商业使用 . 禁止修改作品
TimThumb是一个非常简单方便的裁剪图片的PHP程序,只要给它设置一些参数,它就可以生成缩略图。许多 WordPress 主题现在使用 TimThumb,一个 PHP 类库,用于缩略图处理。

使用说明:
TimThumb对服务器有要求,需要服务器支持GD库。现在一般主机都支持。然后从TimThumb官网下载脚本上传到服务器。在与TimThumb相同的目录下,新建一个缓存文件夹,并设置缓存文件文件夹为可写。

TimThumb 是一个非常易于使用的 PHP 裁剪脚本。这是裁剪图像的简单示例:

http://你的网站/timthumb.php?src=图片绝对地址&w=裁剪后的宽度&h=裁剪后的高度&q=生成图片的质量&ct=如果是PNG图片,是否是裁剪后透明
从上面的请求例子可以看出,它的参数都是用GET方式提交的。

(TimThumb is a very simple and convenient PHP program for cropping pictures, as long as you set some parameters to it, it can generate thumbnails. Many WordPress themes now use TimThumb, a PHP library for thumbnail handling.

Instructions for use:
TimThumb has requirements on the server, and the server needs to support the GD library. General hosts now support it. Then download the script from the TimThumb official website and upload it to the server. In the same directory as TimThumb, create a new cache folder and set the cache file folder as writable.

TimThumb is a very easy to use PHP cropping script. Here's a simple example of cropping an image:

http://your website/timthumb.php?src=absolute URL of image &w=width after cropping&h=height after cropping&q=quality of generated image&amp ;ct=If it is a PNG image, whether it is transparent after cropping
As can be seen from the above request example, its parameters are all submitted in GET mode.)

[下载]14494470455.rar




上一篇:php中文网的右下角跳转广告代码
下一篇:修复jQuery右侧可隐藏QQ在线客服