在Magento中,我想实现Captcha.在我的CaptchaSecurityImages.php /cms/mycaptcha目录中有这个模板。在同一目录中,我有myform.phtml。我想要实现的是
<img src="CaptchaSecurityImages.php?width=100&height=40&characters=5" />我没有得到任何东西。我还在此directory.What中包含了monofont.ttf文件。为了使验证码正常工作,我需要做什么吗
我正在使用以下验证码
http://www.white-hat-web-design.co.uk/articles/php-captcha.php
Whiich在我所有的php表单上都工作得很好。请帮帮忙。
发布于 2011-03-23 00:23:51
在magento中,实现这一点的正确方法是创建一个新块。但是,如果您想以一种快捷的方式来完成此操作,则可以将CaptchaSecurityImages.php文件复制到您想要的任何位置,例如,在项目的根文件夹中。然后就可以直接从浏览器http://xxxxx/CaptchaSecurityImages.php访问它了。
如果您没有看到任何东西(空白屏幕,而不是404错误),我认为该文件中存在错误。要查看问题,可以强制PHP显示错误,在PHP文件的开头添加以下内容:
error_reporting(E_ALL);
ini_set('display_errors', '1');发布于 2012-05-31 12:07:23
在我的例子中,产生这个错误是因为它没有激活扩展extension=php_gd2.dll
发布于 2013-01-19 19:11:28
下面是如何在Magento 1.7+中使用CAPTA-Technique的说明
http://www.cartware.de/blog/detail/article/captcha-feature-aus-magento-17-in-eigenem-modul-einsetzen/
它是德语的,但通过阅读代码,您可能会得到线索…
https://stackoverflow.com/questions/5390169
复制相似问题