There will be a verification code upon login. after reading the code, its src points to a PHP address (maybe not the PHP address, so src & quot; loginverificationCode? 0.8308222951445625 & quot;). open this address separately and garbled characters are displayed. how can I put this image down? It is... a verification code will be generated during login. after reading the code, its src points to a PHP address (it may not be a PHP address, so
src="/login/verificationCode?0.8308222951445625"), Open this address separately, and garbled characters appear. could you please ask how to put this picture down? Prepare for the next verification code. Have you studied any related Friends? thank you!
Reply content:
There will be a verification code upon login. after reading the code, its src points to a PHP address (maybe not the PHP address, this waysrc="/login/verificationCode?0.8308222951445625"), Open this address separately, and garbled characters appear. could you please ask how to put this picture down? Prepare for the next verification code. Have you studied any related Friends? thank you!
This is not garbled. it is only the binary stream of jpg, gif, and png. it is jpeg or png. you need to check the first few digits of the binary stream, and there will be a mark such as JPEG in the previous one.
This binary stream is saved1.jpgThe result is displayed.
Or set the content-type to image/jpeg during the request, so that the request can be directly viewed.
It is recommended that the subject take a look at the TP verification code generation to understand the meaning of the signature.
Verification code
Same problem
Then you can see
Generally, verification code images are not stored or cached.
Re-access to this link will only generate new images. Therefore, you must store the images and then call them.
Previously in the project, we used js to call the interface to encrypt the binary stream resource of the verification code Image and transmit it to the client using base64_encode.
You can refer to the implementation method below
Has the landlord solved this problem? I am also encountering this problem.