<?php
$image_src = '/img/logo-zhidao.gif';//传递的参数
$image = array_pop(explode('/',$image_src));
//如果传递的不是URL 上两步可以不写
$image_type = array_pop(explode('.',$image));
header("Content-type:".$image_type);//注意类型
$filecontent = file_get_contents($image_src);//读取文件
echo $filecontent;//输出文件
Article Detail
用php文件来显示网络图片以达到隐藏文件真事路径的方法
<?php $image_src = '/img/logo-zhidao.gif';//传递的参数 $image = array_pop(explode('/'...