PHP4 GD setting

xiaoxiao2021-03-06  21

Discover, the simplest is:

Windows Under this:

PHP.INI is the one under Windows, change two places

EXTENSION_DIR = "C: / PHP4 / EXTENSIONS /"

EXTENSION = php_gd2.dll

It is enough to change these two.

Examples are:

PHP Header ("Content-Type: Image / PNG"

$ IMG_HANDLE = ImageCreate (230, 20) OR DIE ("Cannot Create Image"

$ Back_color = imagecolorallocate ($ IMG_HANDLE, 0, 10, 10

$ Txt_color = imagecolorallocate ($ IMG_HANDE, 233, 114, 191

); Imagestring ($ IMG_HANDLE, 31, 5, 5, 5, "My First Program with GD", $ TXT_COLOR

Imagespng ($ IMG_HANDLE)

);

?>

转载请注明原文地址:https://www.9cbs.com/read-44323.html

New Post(0)