Php Base64encode图像字符串被截断
我的字符串被截断了。我找不到原始字符串Php Base64encode图像字符串被截断,php,html,angularjs,Php,Html,Angularjs,我的字符串被截断了。我找不到原始字符串 $img_file = product6.jpg'; $imgData = base64_encode(file_get_contents($img_file)); $src = 'data:image/jpg;base64,'.$imgData; 你能帮我吗?你缺少单引号 $img_file = 'product6.jpg';
$img_file = product6.jpg';
$imgData = base64_encode(file_get_contents($img_file));
$src = 'data:image/jpg;base64,'.$imgData;
你能帮我吗?你缺少单引号
$img_file = 'product6.jpg';