Imagick::readimage(): HTTP request failed
-
Hi
I want to read a specific file from my functions.php to test imagick php extension. But http request fails.Any idea. Thank you
function convertFile() { if (extension_loaded('imagick')) { echo "Imagick extension loaded!"; } else { echo "No imagick extension loaded!"; } $upload_dir = wp_upload_dir(); $image_file_location = $upload_dir['url'] . '/Conexion-VPN-con-doble-autenticacion.pdf'; if ($image_file_location !== false) { $imagick = new Imagick(); $imagick->readImage($image_file_location); // HTTP request fails } else { echo 'Can′t load image from url'; } } add_action('wp_head', 'convertFile');
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Imagick::readimage(): HTTP request failed’ is closed to new replies.