我正在使用来自https://packagist.org/packages/excelwebzone/recaptcha-bundle#v1.5.11的symfony 4和recaptcha包,但我不知道为什么它不能工作。下面是我遇到的错误。我配置了env google recaptcha变量。
文件"C:\xampp\htdocs\projects\symfony-template\config/packages/ewz_recaptcha.yaml“在C:\xampp\htdocs\projects\symfony-template\config/packages/ewz_recaptcha.yaml中不包含有效的YAML (该文件加载在资源"C:\xampp\htdocs\projects\symfony-template\config/packages/ewz_recaptcha.yaml").中)。
yaml档案:
ewz_recaptcha:
public_key: HIDDEN
private_key: HIDDEN
# Not needed as "%kernel.default_locale%" is the default value for the locale key
locale_key: %kernel.default_locale%
HIDDEN
等于google的密钥,但出于安全考虑,我在这里讨论了它。
发布于 2018-10-22 18:54:35
备注:
首先:您必须创建config/packages/ewz_recaptcha.yaml
第二: YAML文件必须具有有效格式:
ewz_recaptcha:
public_key: "here is your public key (this is just example)"
private_key: "here is your private key (this is just example too)
# Not needed as "%kernel.default_locale%" is the default value for the locale key
locale_key: %kernel.default_locale%
https://stackoverflow.com/questions/52934858
复制相似问题