How to Deflate the PHP Icon

The PHP GZIP compression utility compresses an icon file. The compressed file transfers to the user's browser, and then deflates when the icon is displayed on the screen. The "gzopen" function deflates and opens an icon file on your website. You then display the file on the Web page. The GZIP features in PHP improve performance on your website.

Instructions

    • 1

      Right-click the PHP file you want to edit and select "Open With." Click your preferred PHP editor.

    • 2

      Create a variable that defines the icon's name. The following code creates the icon string for the compressed file:

      $icon = "/images/icon.jpg.gz";

      Replace the image file with the name of the icon you want to deflate.

    • 3

      Deflate the file and assign the image to a file handler. The following code defines a handler and deflates the icon image:

      $file = gzopen($icon, 'rb');

Related Searches:

References

Comments

Related Ads

Featured