Imagick给我致命错误:未捕获异常'ImagickException',消息'无法打开图像

I'm pretty sure I've installed my imagick correctly. enter image description here

When I try and run something as simple as displaying an image with no changes to it like so:

header('Content-type: image/jpeg');

$image = new Imagick('image.jpg');

echo $image;

It displays a broken image.

When I attempt to display it without the header it gives me an error

Fatal error: Uncaught exception 'ImagickException' with message 'unable to open image `image.jpg': No such file or directory @ error/blob.c/OpenBlob/2642' in [my-php-file-uri]:4 Stack trace: #0 [my-php-file-uri](4): Imagick->__construct('image.jpg') #1 {main} thrown in [my-php-file-uri] on line 4

The reason was because I had to include the full file-path URI