PHP错误 。Parse error: syntax error, unexpected T_INLINE_HTML, expecting T_ENDSWITCH or T_CASE or T_DEFAULT
If you wan't to use the alternative syntax for switch statements this won't work: <div>
<?php switch($variable): ?>
<?php case 1: ?>
<div>
Newspage
</div>
<?php break;?>
<?php case 2: ?>
</div>
Forum
<div>
<?php break;?>
<?php endswitch;?>
</div> Instead you have to workaround like this: <div>
<?php switch($variable):
case 1: ?>
<div>
Newspage
</div>
<?php break;?>
<?php case 2: ?>
</div>
Forum
<div>
<?php break;?>
<?php endswitch;?>
</div>
看了半天原来是PHP 的BUG。。。 唉。。。
switch : 和 case 之间是不能有任何输出的。。。 PS : 一个空格也不行。。
you may see the comment in this link ........
PHP错误 。Parse error: syntax error, unexpected T_INLINE_HTML, expecting T_ENDSWITCH or T_CASE or T_DEFAULT的更多相关文章
- PHP错误Parse error: syntax error, unexpected end of file in test.php on line 12解决方法
出现这个错误的原因就是语法错误,肯定是PHP程序的书写不规范造成,PHP语句标识符错了,没有在php.ini中开启短标签!八成是这个原因,啊啊啊! 今天在写PHP程序的时候总是出现这样的错误:Pars ...
- PHP关于syntax error语法错误的问题(Parse error: syntax error, unexpected end of file in xxxxxxxx)
在php程序出现类似 Parse error: syntax error, unexpected end of file in xxxxxxxx on line xx 的错误. 如图 如果发现php ...
- Parse error: syntax error, unexpected T_PUBLIC in 问题解决
class 类中 public function _getInfo($sn){ $title = ''; $_array = explode('~', $sn); ...
- *2 FastCGI sent in stderr: "PHP message: PHP Parse error: syntax error, unexpected '[' in /application/nginx-1.6.3/html/zabbix/index.php on line 32" while reading response header from upstream, clien
今天呢想学习一下zabbix监控一下我的服务情况,然后就开始安装我的zabbix服务,首先LNMP环境准备好了,Nginx版本为1.6.3,php版本为5.3.27,MySQL版本为二进制包安装的5. ...
- Parse error: syntax error, unexpected end of file in *.php on line * 解决方法
Parse error: syntax error, unexpected end of file in *.php on line * 解决方法 这篇文章主要介绍了PHP错误Parse erro ...
- Parse error: syntax error, unexpected '__data' (T_STRING), expecting ',' or ')'
使用laravel时,建立view文件引入dafault文件时报错: Parse error: syntax error, unexpected '__data' (T_STRING), expect ...
- Parse error: syntax error, unexpected 'class' (T_CLASS)
电脑坏了重新下载代码. 结果报错 Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_ST ...
- 页面白屏并且报错PHP Parse error: syntax error, unexpected end of file in 试了很久总算解决了
页面白屏并且报错PHP Parse error: syntax error, unexpected end of file in 试了很久 啥短标记,打开,都试了 最简单的办法 是重新建立一个文件, ...
- 使用帝国备份王软件提示 Parse error: syntax error, unexpected end of file
使用帝国备份王软件提示 Parse error: syntax error, unexpected end of file时, 可以尝试一下方法: 1.php.ini要把short_open_tag ...
随机推荐
- 高通 打开 wifi 驱动 log
在WCNSS_qcom_cfg.ini文件中添加 vosTraceEnableSME=255 vosTraceEnableWDI=255 vosTraceEnableWDA=255 vosTraceE ...
- 杂乱所得之RPC【待整理】
在计算机的世界里,不仅有程序内部的通信,还需要程序之间的通信,这又包含两大类:同一台主机的程序之间的通信.不同主机的程序之间的通信. 同一台主机的程序之间的通信就是IPC,IPC(Inter-proc ...
- PHP做Web开发的MVC框架(Smarty使用说明 )
PHP做Web开发的MVC框架(Smarty使用说明 ) 一.Smarty简明教程 1.安装演示 下载最新版本的Smarty-3.1.12,然后解压下载的文件.接下来演示Smarty自带的demo例子 ...
- Spring JDBC多批次操作
以下示例将演示如何使用spring jdbc在单个调用中进行多批次更新. 我们将在批量大小为1的多批次操作中更新student表中的记录. student表的结果如下 - CREATE TABLE s ...
- 配置Server.xml
Service下面的Connector, Engine, Executor. 组件的目录结构,配置文件,配置节点.
- vim介绍/vim颜色显示和移动光标/ vim一般模式下移动光标/ vim一般模式下复制、剪切和粘贴
5.1 vim介绍 5.2 vim颜色显示和移动光标 5.3 vim一般模式下移动光标 5.4 vim一般模式下复制.剪切和粘贴 vim 是vi的升级版本 vim 带有颜色显示 安装vim : y ...
- JSP内置对象—session
什么是session? session对象是用来在每个用户之间分别保存每个用户信息的对象,以便跟踪用户的操作状态.session的信息保存在server端,session的id保存在client的co ...
- mysql 创建和删除用户
1.远程登录mysql mysql -h ip -u root -p 密码 2.创建用户 格式:grant 权限 on 数据库.* to 用户名@登录主机 identified by "密码 ...
- Thinkphp5笔记二:创建模块
系统:window 7 64位 Thinkphp版本:5.0.5 环境:wampserver集成 我的项目是部署在本地www/thinkphp 目录下.在做之前,先要考虑清楚,你需要几个模块来完成你 ...
- js与ios桥接使用WebViewJavascriptBridge简单理解
https://github.com/marcuswestin/WebViewJavascriptBridge function setupWebViewJavascriptBridge(callba ...