Home > Backend Development > PHP Tutorial > javascript - apache+php做后端,前台图片显示不出来

javascript - apache+php做后端,前台图片显示不出来

WBOY
Release: 2016-06-06 20:35:31
Original
1238 people have browsed it

我们的网站后台是apache+php的,业务进程会生成一个JPEG格式的图片,前台有个img标签,设置其src为该图片,让其显示,现在会概率性的出现图片显示不出来,通过ftp下载下来的图片能正常显示,通过src加载的图片用记事本打开后,显示如下错误:

<code><br>
<b>Warning</b>:  Unexpected character in input:  '' (ASCII=7) state=0 in <b>/tmp/img1.jpeg</b> on line <b>1854</b><br>
<br>
<b>Parse error</b>:   in <b>/tmp/img1.jpeg</b> on line <b>1854</b><br>
</code>
Copy after login
Copy after login

不知道有没有人遇到过

回复内容:

我们的网站后台是apache+php的,业务进程会生成一个JPEG格式的图片,前台有个img标签,设置其src为该图片,让其显示,现在会概率性的出现图片显示不出来,通过ftp下载下来的图片能正常显示,通过src加载的图片用记事本打开后,显示如下错误:

<code><br>
<b>Warning</b>:  Unexpected character in input:  '' (ASCII=7) state=0 in <b>/tmp/img1.jpeg</b> on line <b>1854</b><br>
<br>
<b>Parse error</b>:   in <b>/tmp/img1.jpeg</b> on line <b>1854</b><br>
</code>
Copy after login
Copy after login

不知道有没有人遇到过

看起来是你们后台的图片生成的有问题,浏览器打开图片的方式和你用ftp下载图片后打开(这应该是用的本地图片管理工具打开的)方式不同,
一句话:打开的姿势不正确

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template