php drawing does not show the reason and resolution of the picture

  • 2021-01-25 07:18:59
  • OfStack

To draw php, first make sure that the gd library is enabled. Go to php.ini and find extension=php_gd2.dll. Remove and restart the server.

If there is no normal picture in the drawing, the server in the reply request, the picture of the information is wrong, to ensure not to < ?php? > Don't have anything in front, including html.

In addition, the picture is not yet available. Before drawing, clear the cache 1 (that is, before writing header), write ob_clean(); Then it can be displayed (including the preparation of files to download, appear after the download can not open the file, also need to clear 1 cache).

Related articles: