Zend Framework:ERR (3):语法错误,意外 'endif' (T_ENDIF),预期文件结尾
Zend Framework: ERR (3): syntax error, unexpected 'endif' (T_ENDIF), expecting end of file
正在尝试 运行 Zend Framework 应用程序但收到此错误:
2017-07-30T18:40:50+03:00 ERR (3): syntax error, unexpected 'endif' (T_ENDIF), expecting end of file
在文件中突出显示了以下内容:
<? if (count($this->tickets)) : ?>
<tbody class="tickets">
<?php foreach ($this->tickets as $ticket) : ?>
...
<?php endforeach; ?>
</tbody>
<?php endif;?>
有人知道怎么解决吗?
可能是PHP标签的开头。将第一行的 <? if (...
替换为 <?php if (...
。
或者你也可以在php.ini配置文件中设置short_open_tag=On
。
正在尝试 运行 Zend Framework 应用程序但收到此错误:
2017-07-30T18:40:50+03:00 ERR (3): syntax error, unexpected 'endif' (T_ENDIF), expecting end of file
在文件中突出显示了以下内容:
<? if (count($this->tickets)) : ?>
<tbody class="tickets">
<?php foreach ($this->tickets as $ticket) : ?>
...
<?php endforeach; ?>
</tbody>
<?php endif;?>
有人知道怎么解决吗?
可能是PHP标签的开头。将第一行的 <? if (...
替换为 <?php if (...
。
或者你也可以在php.ini配置文件中设置short_open_tag=On
。