GD2 imagegrabscreen致命错误? [英] GD2 imagegrabscreen fatal error?

查看:99
本文介绍了GD2 imagegrabscreen致命错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用以下代码:

<?php
$im = imagegrabscreen();
imagepng($im, "myscreenshot.png");
imagedestroy($im);
?>

结果,我得到了这个:

致命错误:调用未定义函数:imagegrabscreen()第2行上的c:\ usr \ krasnal \ www \ testy marcina \ index.php

Fatal error: Call to undefined function: imagegrabscreen() in c:\usr\krasnal\www\testy marcina\index.php on line 2

我正在使用Windows 7上安装的apatch ver 2.7.还有关于GD的更多信息:

I am using apatch ver 2.7 instaled on windows 7. And one more info about GD:

GD版本:捆绑销售(兼容2.0.28)

GD Version: bundled (2.0.28 compatible)

FreeType支持:是

FreeType Support: yes

FreeType链接:带有freetype

FreeType Linkage: with freetype

T1Lib支持:否

GIF阅读支持:是

GIF创建支持:是JPG支持:是

GIF Create Support: yes JPG Support: yes

PNG支持:是

WBMP支持:是

XBM支持:是

JIS映射的日语字体支持:否

JIS-mapped Japanese Font Support: no

怎么了?

推荐答案

您至少需要php 5.2.2或更高版本,以及php_gd2.dll

You need at least php 5.2.2 or later, and php_gd2.dll

以下是要在您的服务器上测试的代码段: https://stackoverflow.com/a/4526834/1093649

Here is a code snippet to test on your server : https://stackoverflow.com/a/4526834/1093649

如果出现黑屏,请检查 Apache服务特权,如

And if you get a blank screen, please check Apache service privileges like stated on this php manual page comment.

这篇关于GD2 imagegrabscreen致命错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆