0

我需要一个建议。我正在用java开发人脸识别网络服务(SOAP),但前端是php应用程序。用户将通过使用网络摄像头捕获或上传图像来发送图像。但我希望此图像及其详细信息作为 xml 中的文件对象,而不是来自服务器或数据库的路径。请建议我如何处理这个或任何其他方法。

4

1 回答 1

1

Look at one of these:

$requestImageXML = '<img src="data:image/jpeg;base64,' . base64_encode(readfile($filePath)) . '"/>';
$requestImageString = base64_encode(readfile($filePath));
and use the string in a relevant way.

于 2013-07-09T19:32:04.703 回答