隐藏产品图片的文件名 [英] Hide filenames for product images

查看:89
本文介绍了隐藏产品图片的文件名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以隐藏网站上所有产品的图像文件名,以便即使有人选择查看页面源代码或图像属性,他们也无法隐藏? 我需要一种隐藏文件名的方法,因为在某些情况下,它们包含我不想向公众显示的信息.

Is there any way that I can hide the image filenames for all products on a website so that, even if someone chooses to view the page source or image properties, they can't? I need a way to hide the filenames because in some cases they contain information that i dont want to display to the public.

推荐答案

您可以制作一个PHP脚本,以获取不透明的图像ID,找到相应的图像,并将其写到响应流中.

You can make a PHP script that takes an opaque image ID, finds the corresponding image, and writes it out to the response stream.

因此,客户端上的图像URL看起来像../Image.php?ID=<something useless>.

Thus, the image URLs on the client would look like ../Image.php?ID=<something useless>.

记住要设置Content-Type.

这篇关于隐藏产品图片的文件名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆