0

After I changed server the imagecreatefromjpeg doesn't work. I'm thinking it might be because of permissions of some sort because I had to change the way of creating directories after the change.

Any clues on how to fix this?

Code:

    ...
    $imageFile = $_FILES['image']['tmp_name'];
    list($width, $height) = getimagesize($imageFile);
    echo "This gets written";
    $src = imagecreatefromjpeg($imageFile);
    echo "But not this:";
    ...
4

1 回答 1

1

您必须通过在构建过程中添加以下标志来确保使用 GD 编译 PHP --with-gd[=DIR]:. 您的托管公司应该能够为您提供帮助。

有关更多信息,请参阅以下链接:http ://www.php.net/manual/en/image.installation.php

于 2013-03-10T23:03:56.433 回答