首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > PHP >

imagecreatefromstring()函数的用法解决办法

2012-03-09 
imagecreatefromstring()函数的用法手册上的说明:imagecreatefromstring — 从字符串中的图像流新建一图像

imagecreatefromstring()函数的用法
手册上的说明:imagecreatefromstring — 从字符串中的图像流新建一图像

我这样写的:

PHP code
    imagecreatefromstring("http://i3.sinaimg.cn/home/deco/2009/0330/logo_home.gif");


报错:
imagecreatefromstring() [function.imagecreatefromstring]: Data is not in a recognized format

这个函数的参数应该怎么写呢?

谢谢!

[解决办法]
它的参数为图像字符串。

参见手册: http://php.net/manual/en/function.imagecreatefromstring.php
[解决办法]
imagecreate — 新建一个基于调色板的图像

imagecreatetruecolor — 新建一个真彩色图像

imagecreatefromstring — 创建一个图像资源从字符串中的图像流。

你看看你是属于哪种情况。

热点排行