I want to add captcha in myfile.ctp. For this i found source for captcha along with some resource files includs(js, php).
I know the folder for js files & include this file using <?php echo $javascript->link(array('ajax_captcha.js'));?>. But I don’t know where to place .php file &
also how to include it in myfile.ctp
Or if anybody help me to implement Captcha in Cakephp.
For your js, use
$javascript->link('ajax_captcha',false);Not the omission of the extension. false will place it in the section of the HTML. This will look for the script inwebroot/jsPersonally, I would just use a standard php include directive for the php side of things, bearing in mind that the location will be relative to webroot, i.e.
'/myPHP/captcha.php'will bewebroot/myPHP/captcha.php.Don’t forget, CakePHP is PHP.