创建按钮cakephp发生内部错误时发生错误:发生了内部错误
<?= $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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
每当收到错误时,请确保检查您的日志(
/logs/
文件夹)和/或启用调试模式(debug
inconfig/config/app中.php
或config/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 inconfig/app.php
orconfig/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.替换
为
replace this
by