Call to undefined function recaptcha_get_html() How to fix?
Hello all im getting the following error. I tried putting the files everywhere i can and no fix. is there something else i have to do to make this wo开发者_如何转开发rk? thanks here is the error
Fatal error: Call to undefined function recaptcha_get_html() in /home/folder/public_html/site/views/users/register.php on line 75
The function recaptcha_get_html()
has to be visible from the file you're trying to use it : to be able to call that function, PHP must know it.
Here, you are using this function in register.php
.
But that function is (I guess) defined in another file.
Which means you have to include or require that other file, from register.php
(or another file that's required by it).
See the require
and include
, and their _once versions : require_once
and include_once
.
For example, at the beginning of register.php
, you could have something like this :
require_once dirname(__FILE__) . '/../libraries/recaptcha.php';
Of course, up to you to adapt the path to the file ;-)
精彩评论