T_INLINE_HTML? What#39;s wrong with this?(T_INLINE_HTML?这有什么问题?)
问题描述
<? switch($data['type']) : ?>
<? case 'log': ?>
    <? while ($row = $data['loop']->fetch()) : ?>
        <table class="t-errors">
            <tr>
                <td>
                    <b>IP:</b> <? echo $row['LogShellIP']; ?>
                    <b>Command:</b> <? echo $row['LogShellCommand']; ?>
                    <b>Executed:</b> <? echo $row['LogShellReturn']; ?>
                    <b>Time:</b> <? echo format::time($row['LogShellTime']); ?>
                </td>
            </tr>
        </table>
    <? endwhile; ?>
<? break; ?>
<? case 'fatal': ?>
<? case 'warning': ?>
<? case 'notice': ?>
<? case 'unknown': ?>
    <? while ($row = $data['loop']->fetch()) : ?>
        <table class="t-errors">
            <tr>
                <td <? if ($row['LogErrorSeen'] == 0) { echo 'class="e-selected"'; } ?>>
                    <b>String:</b> <? echo $row['LogErrorString']; ?>
                    <b>File:</b> <? echo $row['LogErrorFile']; ?>
                    <b>Line:</b> <? echo $row['LogErrorLine']; ?>
                    <b>Context:</b> <? echo $row['LogErrorContext']; ?>
                    <b>Ip:</b> <? echo $row['LogErrorIP']; ?>
                    <b>Time:</b> <? echo format::time($row['LogErrorTime']); ?>
                </td>
            </tr>
        </table>
    <? endwhile; ?>
<? break; ?>
<? endswitch; ?>                    
我收到此错误:
解析错误:语法错误,意外T_INLINE_HTML,期待 T_ENDSWITCH或 T_CASE 或 T_DEFAULT 在/Applications/XAMPP/xamppfiles/htdocs/Smooth框架/tpl/terminal.tpl.php上线33
Parse error: syntax error, unexpected T_INLINE_HTML, expecting T_ENDSWITCH or T_CASE or T_DEFAULT in /Applications/XAMPP/xamppfiles/htdocs/Smooth Framework/tpl/terminal.tpl.php on line 33
其中第 33 行是该脚本的第 2 行.这被插入到模板上下文中.这有什么问题?他期待一个T_CASE,就是这样!
Where line 33 is the line 2 of this script. This is inserted in a template context. What's wrong with this? He is expecting a T_CASE and that's what is there!
推荐答案
合并第一行和第二行
  <? switch($data['type']):
     case 'log': ?>
请参阅此 链接 中的评论(jeremia在 2008 年 1 月 28 日 02:52 的 gmx 点)
see the comment in this link (jeremia at gmx dot at 28-Jan-2008 02:52)
这篇关于T_INLINE_HTML?这有什么问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:T_INLINE_HTML?这有什么问题?
				
        
 
            
        - 没有作曲家的 PSR4 自动加载 2022-01-01
 - PHP Count 布尔数组中真值的数量 2021-01-01
 - 正确分离 PHP 中的逻辑/样式 2021-01-01
 - Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
 - Mod使用GET变量将子域重写为PHP 2021-01-01
 - SoapClient 设置自定义 HTTP Header 2021-01-01
 - 从 PHP 中的输入表单获取日期 2022-01-01
 - Laravel 仓库 2022-01-01
 - 如何定位 php.ini 文件 (xampp) 2022-01-01
 - 带有通配符的 Laravel 验证器 2021-01-01
 
				
				
				
				