CI Framework: How to use custom captcha libraries

Updated on technology 2024-03-30
7 answers
  1. Anonymous users2024-02-07

    Explanation:First of all, the captcha** is an img,And its src must be a dynamic generate**path,We can fix a method specifically for doing the captcha,Here take the verificationcode method as an example,This method is the method of generating**,So that there will be an initial ** when entering this page**,When we click on this**, we will keep changing the different**,That is, the use of asynchronous submission,The following is js**。

    The verification code is refreshed.

    function verificationcode(){

    var rad = , 8));

    uuuy is a parameter name that is written casually, and the backend will not do it, and the function is to avoid the browser from reading the cached link.

    #randcodeimage").attr("src", verificationcode/?uuuy="+rad);

    Why add a random number at the back to see because if you don't add a random number, every time you keep accessing the same exact same method, you won't actually execute this method, because it is a cache, so sometimes click on the verification code**refresh** but don't move, that's the reason, plus verification will let the system know that your access address has changed, and you won't take the cache.

  2. Anonymous users2024-02-06

    Write a function, put it in the helpers folder, and load it when you use it.

  3. Anonymous users2024-02-05

    It's okay to write a hepler, write a library, read more manuals.

  4. Anonymous users2024-02-04

    Restart Apache. Make a test page var dump(gd info()) to output data indicating that the php gd library reference was successful.

    The PHP GD library generates captchas.

    PHP GD library commit page check

  5. Anonymous users2024-02-03

    My Projects**:

    set('sekey',c('verify_key'));

    verify->_set('usezh',true);

    verify->_set('bg',array(235, 246, 230));

    verify->_set('length',2);

    verify->_set('fontsize',14);

    verify->_set('imageh',40);

    verify->_set('imagew',70);

    verify->_set('code',get_word())return $verify->entry(1);

    The get word method is to get a two-word word at random.

    Also, the font comes with TP.

    The directory is at: thinkphp library think verify

  6. Anonymous users2024-02-02

    "You can only use the method inside after jumping," First of all, the landlord's statement is wrong. Secondly, does the landlord want to query the database in the view? This is not recommended, and it is better to use only the helper for the view, which is any part of the helper where CI can be called.

    Or what the landlord may need is:

  7. Anonymous users2024-02-01

    Not to say ajax!! This is the header page, which is contained in other pages...

Related questions
8 answers2024-03-30

Clause. 1. Use graphics software (such as CorelDraw) to make the materials required for dynamic expressions, and export them to jpg format (you can also use the existing ** to combine them yourself). In Photoshop, remove the ** and put it in a folder in order of dynamic expression changes. >>>More

12 answers2024-03-30

The first way: Replace Samsung i9000 system sound files.

Eliminate the sound of taking pictures with your own camera. >>>More

14 answers2024-03-30

private sub command1_click()dim i as integer

dim sum as long >>>More

8 answers2024-03-30

After selecting the main keyword in the excel sorting dialog box, click the option, you can choose the custom sequence as the sorting order, which makes the sorting convenient, fast and easier to control, so how to customize the sorting method for cell text or numbers in excel, let's take a look! >>>More

6 answers2024-03-30

1.Select **, right-click, select "Add Stocks", and press Ctrl or Shift. >>>More