Use PHP to draw login verification pictures. Since the pictures are taken locally, I don’t want to return the picture in the form of a link. I want to name the drawn verification code picture, then save it to the specified path, and then return a local Give the url address to the front desk, and the front end directly inserts the address in <img src="url"/>. How to achieve this? Thank you~
< /p>
< br>Up to this point, I just output a png image to the browser. How do I name the image and save it locally?
Also, is this approach correct?
Img’s src can be written to death
If the data obtained by ajax is placed in the src of img, an error will be reported
Don’t generate pictures anymore. Save it every time you refresh. Think about your hard drive space. If you must do this
modify the eighth line
$pic = "C:pic.png";
imagepng($im,$pic);
is the local path address