php code:
How to use PHP's base64 function? PHP code calls are much simpler
The garbled problem of unicode characters is still not solved
Can someone provide some methods? thanks
How to use PHP's base64 function? PHP code calls are much simpler
PHP Code:
$api = 'https://aip.baidubce.com/rest/2.0/ocr/v1/general_basic?access_token=xxxxxxx';
$header = ['Content-Length: multipart/form-data'];
$file = '/data/image/a.png'; // Local image path
$image = base64_encode(file_get_contents($file));
$post = [
'image' => $image,
];
$res = request_post($api, $post, $header);
The garbled problem of unicode characters is still not solved
Can someone provide some methods? thanks