我在警告时无法打开流:file_get_contents(img/service/polaroid/pol_b1cfb94c5c28b8c2ffaa0db64132b700.png) [function.file-get-contents]: failed to open stream: No such file or directory in C:\xampp\htdocs\XXX\class\service.php on line 18
图像存储在/XXX/img/service/polaroid/pol_b1cfb94c5c28b8c2ffaa0db64132b700.png
.
PHP_SELF 显示/XXX/main.php
.
有人可以告诉我有什么问题吗?我尝试进行相对路径"../img/etc"
思考,因为我是从类文件夹中调用的,但这并不奏效。
$image = $row->pol_path;
$image_data = base64_encode(file_get_contents($image));
$src='data: image/png;base64, '.$image_data;