Home >Backend Development >PHP Tutorial > imagegif函数linux下失败,windows下成功,为什么?解决思路

imagegif函数linux下失败,windows下成功,为什么?解决思路

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 13:52:24847browse

imagegif函数linux下失败,windows下成功,为什么?
分别在windows下和linux下执行代码:($gif_app为图片路径名)
$img_app = imagecreatefromgif($gif_app);
echo "$img_app
";
if(imagegif($img_app,"../images/atopo.gif"))
  echo "success";
else echo "fail";

windows下成功的产生了图片atopo.gif

但linux下面执行结果为
Resource id #3 
fail

php版本是php-5.2.6-2.fc8
gd库版本是gd-2.0.35-1.fc8

请高手指教!


------解决方案--------------------
权限够吗?

------解决方案--------------------
../images/目录,是否有写入权限
------解决方案--------------------
凡是关于文件的操作,第一个想到的问题就应该是权限问题.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn