技术饭 通过ghostscript将pdf转成图片

需要将pdf转成图片有很多种方式,对于php来说可以通过 ImageMagick 扩展来实现,ImageMagick 主要是处理一系列图片处理,但是如果需要支持pdf转图片需要用到 ghostscript 依赖来实现转换。ImageMagick >= 6.2.4 is required. The amount of file formats supported by Imagick depends entirely upon the amount of formats supported by your ImageMagick installation. For example, Imagemagick requires ghostscript to conduct PDF operations.

阅读全文 » 14天前
2024年04月09日

技术饭 php通过ImageMagick类库将pdf转换成图片

php通过ImageMagick类库将pdf转换成图片,Imagick 是用 ImageMagic API 来创建和修改图像的PHP官方扩展。ImageMagick 是用来创建,编辑,合并位图图像的一套组件。 它能够用于读取,转换,写入多种不同格式的图像。 包含 DPX、EXR、GIF、JPEG、JPEG-2000、PDF、PhotoCD、PNG、Postscript、SVG 和 TIFF。

阅读全文 » 145天前
2023年11月30日

技术饭 PHP使用Redis的Hash(哈希表)命令

PHP使用Redis的Hash(哈希表)命令,本文介绍了Redis的Hash(哈希表)命令:hDel,hExists,hGet,hGetAll,hIncrBy,hIncrByFloat,hKeys,hLen,hMGet,hMSet,hSet,HSetnx,hVals作用和php的使用

阅读全文 » 1117天前
2021年04月02日

技术饭 Git 使用中显示“Another git process seems to be running in this repository, e.g. an editor opened by 'git commit'. P”问题解决

fatal: Unable to create 'F:/wnmp/www/gittest/.git/index.lock': File exists.,Git提示存在index.lock被锁住,Another git process seems to be running in this repository, e.g. an editor opened by 'git commit'. Please make sure all processes are terminated then try again. If it still fails, a git process may have crashed in this repository earlier: remove the file manually to continue.

阅读全文 » 1461天前
2020年04月23日

技术饭 微信小程序通过STS方式直接上传视频到阿里视频点播解决方案

微信小程序通过STS方式直接上传视频到阿里视频点播解决方案,这里必须批评下阿里云官方的文档写的实在是让人看不懂,是在太乱啦,阿里官方并没有提供微信小程序上传的SDK,然后这个小问题困扰了我两天的时间,下了好几次工单,然后自己一步一步摸索才解决的。

阅读全文 » 1693天前
2019年09月04日

技术饭 nginx+php使用open_basedir限制站点目录防止跨站

今天在帮助一个朋友配置一台服务器时发现网站配置好了缓存目录读写不成功,在打开错误时发现提示 Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(../license.php) is not within the allowed path(s): 错误了。

阅读全文 » 1947天前
2018年12月24日

技术饭 php操作redis常用方法代码示例

php操作redis常用方法代码示例,phpredis是php的一个扩展,效率是相当高有链表排序功能,对创建内存级的模块业务关系,Redis 是一个开源(BSD许可)的,内存中的数据结构存储系统,它可以用作数据库、缓存和消息中间件。 它支持多种类型的数据结构,如 字符串(strings), 散列(hashes), 列表(lists), 集合(sets), 有序集合(sorted sets) 与范围查询, bitmaps, hyperloglogs 和 地理空间(geospatial) 索引半径查询。 Redis 内置了 复制(replication),LUA脚本(Lua scripting), LRU驱动事件(LRU eviction),事务(transactions) 和不同级别的 磁盘持久化(persistence), 并通过 Redis哨兵(Sentinel)和自动 分区(Cluster)提供高可用性(high availability)。

阅读全文 » 2538天前
2017年05月12日