| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx
jopen
10年前发布

php读取图片流输出到页面图片

读取图片流代码

    <?php                                @ header("Content-Type:image/png");        $imagespath = $_GET['imagespath'];        $vms_ini_path=dirname(dirname(dirname(dirname(__FILE__)))).'\vms.ini';//vms.ini文件绝对路径        $ini_array = parse_ini_file($vms_ini_path);        $imagespath = $ini_array['CAPTURE_PATHNAME'].$imagespath;                echo file_get_contents($imagespath);                function isExist($path){            if (!is_dir($path)){                return false;            }else{                return true;            }        }                        //声明需要创建的图层的图片格式        //@ header("Content-Type:image/png");                //echo file_get_contents("C:\VMS_CAPTURE\hulu.png");                                ?>  

显示图片
    <img alt="JS相册特效" src="<?php echo "photop_api.php?imagespath=".$imagesarray[$i]?>" onload="scaleImage(this,99,75)" alt=""/>