依赖 exif_read_data() 的代码停止产生预期输出
我有一个照片博客,可以从我的图像中打印出 EXIF 信息 (http:// php.net/manual/en/function.exif-read-data.php)。
效果很好,直到今天。它只是停止打印数据。我没有对文件进行任何更改。
图片位于 WordPress 上传文件夹中。如果我尝试在 public_html 中使用 image+exif php 文件,我会像往常一样获取数据。是什么导致了这种情况?谢谢!
I have a photoblog which prints out EXIF info from my images (http://php.net/manual/en/function.exif-read-data.php).
Worked great, until today. It just stopped printing out the data. I have not made any changes to the files.
The images are located in wordpress upload folder. If i try with an image+exif php file in public_html, i get the data as usual. What could have caused this? Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果图像以相同的方式加载,并且代码没有发生任何更改,那么唯一的结论是图像不再包含 EXIF 数据,或者编码方法已更改。
将功能期间图像中的所有 EXIF 标签与当前图像进行比较。输入一定有一些差异。
If the images are being loaded the same way, there have been no changes to code as you indicate, then the only conclusion is that the images no longer contain EXIF data, or the method of encoding has changed.
Compare all EXIF tags from an image during the functional period to a current one. There must be some difference in the input.
由于它刚刚停止工作,我猜测这与您的共享服务器有关。查看您的 Php 配置,并查看是否启用了“EXIF 支持”。
您可以像这样调用 phpinfo():
如果 Php 配置存在问题,有一些解决方法(某些共享主机允许您通过使用 .htaccess 或将 php.ini 文件添加到目录来配置 php,其中包含以下设置被覆盖,但您最好与您的共享托管提供商联系)。
As it just stopped working I would guess that its something to do with your shared server. Have a look at your Php configuration, and see if "EXIF Support" is enabled.
You can call phpinfo() like this:
If there is an issue with Php configuration, there are workarounds (some shared hosting allow you to configure php by using a .htaccess or adding php.ini file to a directory, containing the settings that are to be overridden, but you might be better getting in contact with your shared hosting provider).