There is a problem with the final call of php to implement image verification code?
罗梅光
罗梅光 2022-05-05 01:22:00
0
8
976

According to php how to implement image verification code content guide encapsulation verification code class capt 0.png capt1 0.png

罗梅光
罗梅光

reply all(4)
autoload

Use realpath() for the font path to convert the relative path to an absolute path

  • reply Thanks for the reply, sir. The image is generated now, but it cannot be displayed on the page. It is only displayed on the network. Try ob_clean(); later.
    罗梅光 author 2022-05-05 12:48:07
  • reply Boss, I tried ob_clean(); but it didn’t work either. The image is now generated, but it cannot be displayed on the page. It is only displayed on the network.
    罗梅光 author 2022-05-05 13:38:13
  • reply How to separate the front-end and back-end to display the returned image on the page img.
    罗梅光 author 2022-05-05 13:38:59
  • reply Solved, thank you php.cn boss. ob_start(); imagepng($img); $image_data = ob_get_contents(); ob_end_clean(); $base64 = chunk_split(base64_encode($image_data)); return 'data:image/png;base64,' . $base64;
    罗梅光 author 2022-05-05 14:20:40
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!