The example in this article describes the workaround for the Thinkphp,onethink and Thinkox validation code not shown. Share to everyone for your reference, specific as follows:
When using the verification code, it starts normal, and then it doesn't show up.
Online said is utf-8 coding problem, what BOM removed, into a no BOM format
I tried, it didn't work.
Later I knew it was written in the place where the captcha was invoked.
Public Function Verify () {
import (' ORG. Util.image ');
Image::buildimageverify ();
}
That would be fine:
Public Function Verify () {
import (' ORG. Util.image ');
Ob_clean ()//This is the key
image::buildimageverify ();
}
Ob_clean This function is used to discard the contents of the output buffer, if your site has a lot of generated picture class files, then want to access the correct, you need to often clear the buffer.
More interested in thinkphp related content readers can view the site topics: "thinkphp Introductory Course", "thinkphp Common Methods Summary", "PHP Cookie Usage Summary", "Smarty Template Introductory Course" and "PHP template technology Summary."
I hope this article will help you with the PHP program design based on thinkphp framework.