cakephp index.ctp 文件语法错误



它向我显示了一个错误:-

错误

:语法错误,意外的"=>"(T_DOUBLE_ARROW( 文件 C:\Windows\System32\myapp1\src\Template\Myapp1\index.ctp 行: 50

第50行如下:

<li><?= $this->Html->link(__('List <%= $this->_pluralHumanName($alias) %>'),['controller '] => '<%= $details['controller'] %>','action' => 'index']) ?></li>

我需要在这里做什么?

请检查路由...你写了['控制器']=>

<li><?= $this->Html->link(__('List <%= $this->_pluralHumanName($alias) %>'),['controller '] => '<%= $details['controller'] %>','action' => 'index']) ?></li>

应该是,

<li><?= $this->Html->link(__('List <%= $this->_pluralHumanName($alias) %>'),['controller' => '<%= $details['controller'] %>','action' => 'index']) ?></li>

它说:错误:语法错误,意外的"控制器"(T_STRING(, 期待"]"文件 C:\Windows\System32\myapp1\src\Template\Myapp1\index.ctp 行: 51

请检查 index.ctp,没有给出"]"。或再次共享您的代码

最新更新