错误输出打开图片文件 [英] error ouput opening a picture file
问题描述
嘿伙计们,
我用gd_library创建了很多图片文件,我最近决定将我网页服务器上的所有图片文件重命名为文本而不是数字。
示例:productsssh.jpg
我打开一些图片文件时最近收到了一个奇怪的错误。这是图片的名称:productsssh.jpg。
只有当我通过网络打开图片时才会出现以下错误:
Hey guys,
I have created many picture files using gd_library, I recently decided to rename all of my pictures files on my web server to text instead of just numbers.
Example: productsssh.jpg
I am recently receiving a wierd error when I open up some of the picture files. Here is the name of the picture: productsssh.jpg.
I get the following error only when i open up that picture via the web:
警告:输入中出现意外的字符:''?''(ASCII = 24)state = 1 in / home / virtual / site1 / fst / var / www / html /第15行的pics / productsssh.jpg
警告:输入中出现意外的字符:''在/home/virtual/site1/fst/var/www/html/pics/productsssh.jpg第15行
解析错误:语法错误,第15行/home/virtual/site1/fst/var/www/html/pics/productsssh.jpg中的意外T_STRING
Warning: Unexpected character in input: '''' (ASCII=24) state=1 in /home/virtual/site1/fst/var/www/html/pics/productsssh.jpg on line 15
Warning: Unexpected character in input: '' in /home/virtual/site1/fst/var/www/html/pics/productsssh.jpg on line 15
Parse error: syntax error, unexpected T_STRING in /home/virtual/site1/fst/var/www/html/pics/productsssh.jpg on line 15
当我将文件重命名为producsssh.jpg时它开放得很好。
我不知道为什么我在尝试打开文件时遇到apache或php错误。其次,我不知道为什么只有当我尝试通过我的服务器在网上查看文件时才会收到错误。如果我真的下载文件,我可以通过我的电脑完全打开它。
我的网络服务器是一个linux盒子redhat。
我只是做的是通过网络打开图片文件...为什么我收到了php或apache错误....错误来自哪里?
关于此事的任何帮助将会非常感兴趣。
When i rename the file to "producsssh.jpg" it opens up perfectly fine.
I don''t know why i am getting an apache or php error when attempting to open the file. Second, I don''t know why i am getting the error only when i try to view the file over the web via my server. If I actually download the file I can perfectly open it via my computer.
My webserver is a linux box redhat.
All I am doing is opening up a picture file via the web... why am i receinving a php or apache error.... where is the error coming from?
Any help regarding this matter would be greatly appriciated.
推荐答案
Heya,Bytesc。
当您使用'.php命名图像文件时''扩展,Apache正在尝试将其作为PHP脚本执行,这会产生所有这些错误。
Heya, Bytesc.
When you name your image file with a ''.php'' extension, Apache is trying to execute it as a PHP script, which is generating all those errors.
没有图片不是php扩展名。这些图片是jpeg示例:productssh.jpg。
No the pictures are not witht he php extension. ALl the pictures are jpeg example: productssh.jpg.
没有图片不是他的php扩展名。 ALl图片是jpeg示例:productssh.jpg。
No the pictures are not witht he php extension. ALl the pictures are jpeg example: productssh.jpg.
这不是PHP的问题。
我建议你在Apache论坛上提问。
This isn''t a PHP problem then.
I suggest you ask in the Apache forum.
这篇关于错误输出打开图片文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!