更改 GIF 中的颜色 (Windows Server)
我目前正在迁移到 Windows 2008 上托管的 VPS,但我的一个脚本现在无法运行。我收到的错误是:
警告:imagegif() [function.imagegif]:无法打开“test.gif”以在第 28 行的 C:\Inetpub\vhosts\footielegend.co.uk\httpdocs\ajax\kit.php 中写入
首先,我我想让您知道我非常熟悉 Windows 权限,所以这肯定不是权限问题。这两个图像都存在(我使用相同的目录只是为了便于访问)。这已经从一个工作服务器转移到另一个服务器上,两者都托管相同的网站。
$imgname = "1-1.gif";
$im = imagecreatefromgif ($imgname);
$primary = imagecolorexact($im, 255,0,0 );
imagecolorset($im,$primary,$aR,$aG,$aB);
$secondary = imagecolorexact($im, 0,255,0 );
imagecolorset($im,$secondary,$bR,$bG,$bB);
$imgname = "test.gif";
imagegif($im, $imgname);
imagedestroy($im);
I'm currently moving to a VPS hosted on Windows 2008 but one of my scripts doesn't work now. The error I'm getting is:
Warning: imagegif() [function.imagegif]: Unable to open 'test.gif' for writing in C:\Inetpub\vhosts\footielegend.co.uk\httpdocs\ajax\kit.php on line 28
Firstly, I'd like to let you know I'm very familiar with Windows Permissions, so it's certainly not a permissions issue. Both the images exist (I've used the same directory just for ease of access). And this has come out of a working server onto a server, both hosting the same website.
$imgname = "1-1.gif";
$im = imagecreatefromgif ($imgname);
$primary = imagecolorexact($im, 255,0,0 );
imagecolorset($im,$primary,$aR,$aG,$aB);
$secondary = imagecolorexact($im, 0,255,0 );
imagecolorset($im,$secondary,$bR,$bG,$bB);
$imgname = "test.gif";
imagegif($im, $imgname);
imagedestroy($im);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
毕竟这是一个权限问题。 :)
It was a permissions issue after all. :)