class 类中

public function _getInfo($sn){
        $title = '';
        $_array = explode('~', $sn);
        if(count($_array) > 0){
            $title = $_array[0];
        }
        return $title;
    }

提示下面错误:Parse error: syntax error, unexpected T_PUBLIC in

看错误提示一直以为是函数设置 public 有问题。最后查到问题竟然是在它上面的函数竟然是{}不匹配造成的。

好郁闷。

Parse error: syntax error, unexpected T_PUBLIC in 问题解决的更多相关文章

  1. *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. ...

  2. 页面白屏并且报错PHP Parse error: syntax error, unexpected end of file in 试了很久总算解决了

    页面白屏并且报错PHP Parse error:  syntax error, unexpected end of file in 试了很久 啥短标记,打开,都试了 最简单的办法 是重新建立一个文件, ...

  3. PHP错误Parse error: syntax error, unexpected end of file in test.php on line 12解决方法

    出现这个错误的原因就是语法错误,肯定是PHP程序的书写不规范造成,PHP语句标识符错了,没有在php.ini中开启短标签!八成是这个原因,啊啊啊! 今天在写PHP程序的时候总是出现这样的错误:Pars ...

  4. 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 ...

  5. Parse error: syntax error, unexpected '__data' (T_STRING), expecting ',' or ')'

    使用laravel时,建立view文件引入dafault文件时报错: Parse error: syntax error, unexpected '__data' (T_STRING), expect ...

  6. Parse error: syntax error, unexpected 'class' (T_CLASS)

    电脑坏了重新下载代码. 结果报错 Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_ST ...

  7. 使用帝国备份王软件提示 Parse error: syntax error, unexpected end of file

    使用帝国备份王软件提示 Parse error: syntax error, unexpected end of file时, 可以尝试一下方法: 1.php.ini要把short_open_tag ...

  8. 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 ...

  9. linux篇-Parse error: syntax error, unexpected ‘new’ (T_NEW) in /usr/local/nginx/html/cacti/lib/adodb

    1首先这是基于lnmp模式进行的 2yum安装 yum -y install httpd mysql mysql-server php php-mysql php-json php-pdo 3lib库 ...

随机推荐

  1. Complete The Pattern #6 - Odd Ladder

    Complete The Pattern #6 - Odd Ladder Task: You have to write a function pattern which creates the fo ...

  2. eclipse不自动弹出提示(Alt+/ 快捷键失效)

    转自:http://www.cnblogs.com/shaweng/archive/2013/09/26/3340016.html 主要有一下几种方法:    1.次方法用于没有一点提示的情况:依次打 ...

  3. sdut 2482 二叉排序树

    题目:http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2482 感觉树这一部分掌握的真心不好,以前 ...

  4. poj 1416 Shredding Company( dfs )

    我的dfs真的好虚啊……,又是看的别人的博客做的 题目== 题目:http://poj.org/problem?id=1416 题意:给你两个数n,m;n表示最大数,m则是需要切割的数. 切割m,使得 ...

  5. MYI 文件内容

    参考 http://blog.itpub.net/703656/viewspace-1018470/ 创建表结构 create table test(name char(20), age int, c ...

  6. 在 Azure 中使用公用 IP 创建多 NIC VM

    Russ Slaten  2014年 11 月 18日下午 4点 我们最近宣布了支持具有多个网络接口控制器 (NIC) 的虚拟机 (VM).我仍在努力了解此功能适用的所有新场景,但首先,我希望亲自测试 ...

  7. 使用ServiceStackRedis链接Redis简介

    注:关于如何在windows,linux下配置redis,详见这篇文章:) 目前网上有一些链接Redis的C#客户端工具,这里介绍其中也是目前我们企业版产品中所使用的ServiceStackRedis ...

  8. 【js与jquery】电子邮箱、手机号、邮政编码的正则验证

    //验证邮政编码 $("#postcode").blur(function(){ //获取邮政编码 var postcode=$("#postcode").va ...

  9. 27、Service

    1服务可以通过startservice的方法 开启.通过stopservice的方法 停止. 服务有一个特点: 只会一次onCreate()方法一旦被创建出来,以后oncreate() 就不会再被执行 ...

  10. 开源了一个iOS输入控件【原】

    1.Github 地址:https://github.com/linyc/InputBarFollowKeyboard 2.说明文档:https://github.com/linyc/InputBar ...