PHP内容类型MIME和HTML标签
我正在使用PHP并发送带有content-type:mime的标头,因此我可以使用ReadFile命令在Navigator上打印图像。
我的问题是:有没有办法在显示图像的窗口上添加HTML?我想在读取图像和显示图像的选项卡窗口上添加标题和一个favicon。
一旦添加HTML代码,一切都停止工作。
这是我的代码:
$ImageRoute = "images/photo.png";
$MyImage = getimagesize($ImageRoute);
header("Content-type: {$MyImage['mime']}");
readfile($ImageRoute);
预先感谢:)
I'm using PHP and sending a header with Content-type:mime so I can print an image on the navigator with readfile command.
My question is: Is there a way to add html on the window that displays the image? I want to add a title and a favicon on the tab window where the image is read and displayed.
As soon as I add html code everything stops working.
This is my code:
$ImageRoute = "images/photo.png";
$MyImage = getimagesize($ImageRoute);
header("Content-type: {$MyImage['mime']}");
readfile($ImageRoute);
Thanks in advance :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论