创建按钮cakephp发生内部错误时发生错误:发生了内部错误

发布于 2025-01-25 10:34:06 字数 389 浏览 1 评论 0原文

<?= $this->Form->button($this->Assets->image('right-arrow.png'), [
    'class' => 'btn-captcha',
    'id' => 'invisibleCaptchaShort'
]); ?>

在此操作上没有

<?= $this->Form->button('short'), [
    'class' => 'btn-captcha',
    'id' => 'invisibleCaptchaShort'
]); ?>

错误 错误:发生了内部错误。 有人可以解决我的问题吗

<?= $this->Form->button($this->Assets->image('right-arrow.png'), [
    'class' => 'btn-captcha',
    'id' => 'invisibleCaptchaShort'
]); ?>

No error on this action but when i try to create a button with text like this

<?= $this->Form->button('short'), [
    'class' => 'btn-captcha',
    'id' => 'invisibleCaptchaShort'
]); ?>

Showing : An Internal Error Has Occurred
Error: An Internal Error Has Occurred.
can someone please solve my problem

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

云朵有点甜 2025-02-01 10:34:06

每当收到错误时,请确保检查您的日志(/logs/文件夹)和/或启用调试模式(debug in config/config/app中.phpconfig/app_local.php)获取有关发生错误的更多信息。

另外,建议使用具有正确语法突出显示的IDE/编辑器,您的第二个示例显然存在语法错误,您将关闭button()方法方法在您想要的数组之前调用通过第二个论点。好的IDE/编辑会强调有问题。

Whenever you receive an error, make sure to check your logs (/logs/ folder), and/or to enable debug mode (debug option in config/app.php or config/app_local.php) to get more information on the error that occurred.

Also it is advised to use an IDE/Editor with proper syntax highlighting, your second second example clearly has a syntax error, you're closing off the button() method call before the array that you want to pass as the second argument. A good IDE/Editor would highlight that there's a problem.

总以为 2025-02-01 10:34:06

替换

<?= $this->Form->button('short'), [
    'class' => 'btn-captcha',
    'id' => 'invisibleCaptchaShort'
]); ?>

<?= $this->Form->button('short', [
'class' => 'btn-captcha',
'id' => 'invisibleCaptchaShort'
]); ?>

replace this

<?= $this->Form->button('short'), [
    'class' => 'btn-captcha',
    'id' => 'invisibleCaptchaShort'
]); ?>

by

<?= $this->Form->button('short', [
'class' => 'btn-captcha',
'id' => 'invisibleCaptchaShort'
]); ?>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文