如何使用PHP为动态文本创建图像? [英] How to create images for dynamic text using PHP?
问题描述
我想为我的动态文本创建图像。
我的问题是我正在从某个特定目录中读取文件夹名称。
所以文件夹名称将是什么,但客户端希望该文件夹名称仅作为图像。
所以我想我会在任何唯一名称上放置一个与文件夹同名的图像。
但是客户端没有如果他们创建一个新文件夹,想要创建新图像。
那么我怎么能用PHP做这个呢?
我需要为图像使用一些特定的背景颜色,并且还想为图像中的文本使用一些特定的字体。
I want to create images for my dynamic text.
My problem is that I am reading folder name from some specific directory.
So folder name will be what ever but client wants that folder name should come as the images only.
So I thought that I will place one image with the same name as folder on any unique name.
But client don't want to create new images if they create a new folder.
So how can I do this with PHP?
I need to use some specific background color for image and also want to use some specific font for the text in image.
推荐答案
See imagefttext() in the examples section
这篇关于如何使用PHP为动态文本创建图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!