imagecreatefromjpeg and similar functions are not working in PHP

前端 未结 11 1131
攒了一身酷
攒了一身酷 2020-12-08 09:06

I’ve searched for this and the solutions provided in past questions are completely incomprehensible to me. Whenever I run functions like imagecreatefromjpeg, I

11条回答
  •  感情败类
    2020-12-08 09:30

    As mentioned before, you might need GD library installed.

    On a shell, check your php version first:
    php -v

    Then install accordingly. In my system (Linux-Ubuntu) it's php version 7.0:
    sudo apt-get install php7.0-gd

    Restart your webserver:
    systemctl restart apache2

    You should now have GD library installed and enabled.

提交回复
热议问题