$im = imagecreatefromwebp('site.com/pic.webp'); 

This code works, but if you do it like this

 $pic1 = $a[0]->src; $im = imagecreatefromwebp($pic1); 

Already not working. What is it so? There is a link in the $ pic1 variable.

  • one
    Display the contents of $pic1 as echo "'$pic1'"; . - Visman
  • 'site.com/pic.webp' - emtecif
  • And if there will be http://site.com/pic.webp also will not work? - Visman
  • Actually, I have $ im = imagecreatefromwebp ('http: //site.com/pic.webp'); but does it matter? - emtecif
  • @emtecif, A situation when replacing a string literal with a variable with the same value leads to the inoperability of the code, it smacks of magic. It looks like you have a bug somewhere else. - Dmitriy Simushev

0