从PHP中的URL打开图像[关闭]

So I am trying to open an image from a URL using PHP but nothing seems to work. Here is my code. All i get is a blank box and I have tried with multiple links. This is what I get for any URL I use. Any ideas? Any responses are greatly appreciated

<?php

header('Content-type: image/jpeg;');
$p = 'https://cdn.shopify.com/s/files/1/0094/2252/products/KithxAspenUltraBoostMidMulti-1_grande.jpg?';
$a = file_get_contents('$p');
echo $a;

?>

Don't use single qoutes, in this case, because then your $p var get litteral value (just string :$p) , you need this:

$a = file_get_contents($p);

(or double quotes).