-3
我想保護我的資產網址:我們如何保護我們的資產url
www.example.com/assets/image.jpg。
我想顯示的網址是這樣的:
www.example.com/asdie239487kjjsdfkwjh3erasdfjlkasdf
所以我需要的東西,不能跟蹤我的財富網址。
我想保護我的資產網址:我們如何保護我們的資產url
www.example.com/assets/image.jpg。
我想顯示的網址是這樣的:
www.example.com/asdie239487kjjsdfkwjh3erasdfjlkasdf
所以我需要的東西,不能跟蹤我的財富網址。
你試試:
<?php
// query to database mabye?
$myPath = getImagePath($_GET['id']);
// what kind of image file is that?
$contentType = getContentType($myPath);
// read file content
$img = file_get_contents($myPath);
// here you tell the browser what kind of image is that e.g. jpeg,png,gif...
header("Content-Type: $contentType");
echo $img;
?>
你需要根據自己的需要來定義getImagePath和功能的getContentType。
你可以通過包含另一個虛假路徑包含真實路徑來僞造路徑。 –
「資產」究竟意味着什麼? – C2486