Php 标题(“内容类型:图像/jpeg”)不工作
看完所有类似的问题,没有一种情况像我这样。 删掉所有废话后,我的代码是:Php 标题(“内容类型:图像/jpeg”)不工作,php,Php,看完所有类似的问题,没有一种情况像我这样。 删掉所有废话后,我的代码是: <?php $file = 'Images\Bird1.jpg'; header('Content-Type: image/jpeg'); imagejpeg($file); ?> 文件类型确实是image/jpeg,我还检查了更广泛版本的代码。请帮忙 imagejpeg($file); 此函数需要资源,而不是文件名。你在找什么 readfile($file); readfile($file);
<?php
$file = 'Images\Bird1.jpg';
header('Content-Type: image/jpeg');
imagejpeg($file);
?>
文件类型确实是image/jpeg,我还检查了更广泛版本的代码。请帮忙
imagejpeg($file);
此函数需要资源,而不是文件名。你在找什么
readfile($file);
readfile($file);