How can one activate JPEG support in PHP, specifically when using the GD Library?
To activate JPEG support in PHP when using the GD Library, you need to ensure that the GD Library was compiled with JPEG support enabled. This can be done by checking the output of `phpinfo()` to see if JPEG support is listed. If JPEG support is not enabled, you will need to recompile PHP with the `--with-jpeg` flag or install the necessary JPEG libraries.
```php
// Check if JPEG support is enabled
phpinfo();
```
If JPEG support is not enabled, you will need to recompile PHP with JPEG support or install the necessary libraries.
Keywords
Related Questions
- How can trial and error be used effectively in learning PHP for web development projects?
- In what situations would it be more beneficial to convert PDF files to HTML for web viewing, and when is it better to stick with PDF format?
- What is the common syntax error that can lead to the "unexpected echo" message in PHP?