更改服务器后,imagercreatefromjpeg无法正常工作

时间:2013-03-10 22:57:21

标签: php permissions imagecreatefrompng

更改服务器后,imagecreatefromjpeg不起作用。我在想 可能是因为某种权限因为我不得不改变 改变后创建目录的方式。

有关如何解决此问题的任何线索?

代码:

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

1 个答案:

答案 0 :(得分:1)

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

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