Parse error: syntax error, unexpected T_PUBLIC in 问题解决
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 问题解决的更多相关文章
- *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. ...
- 页面白屏并且报错PHP Parse error: syntax error, unexpected end of file in 试了很久总算解决了
页面白屏并且报错PHP Parse error: syntax error, unexpected end of file in 试了很久 啥短标记,打开,都试了 最简单的办法 是重新建立一个文件, ...
- PHP错误Parse error: syntax error, unexpected end of file in test.php on line 12解决方法
出现这个错误的原因就是语法错误,肯定是PHP程序的书写不规范造成,PHP语句标识符错了,没有在php.ini中开启短标签!八成是这个原因,啊啊啊! 今天在写PHP程序的时候总是出现这样的错误:Pars ...
- 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 ...
- 使用帝国备份王软件提示 Parse error: syntax error, unexpected end of file
使用帝国备份王软件提示 Parse error: syntax error, unexpected end of file时, 可以尝试一下方法: 1.php.ini要把short_open_tag ...
- 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 ...
- 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库 ...
随机推荐
- linux切换用户
当前使用root账户 [root@localhost chucklu]# cd[root@localhost ~]# pwd/root 切换到普通账户 [root@localhost ~]# su c ...
- Java之Comparable接口和Comparator接口
Comparable & Comparator 都是用来实现集合中元素的比较.排序的: Comparable 是在集合内部定义的方法实现的排序: Comparator 是在集合外部实现的排序: ...
- Emulator control为灰色的情况
新建了一个虚拟机,然后发现Emulator control为灰色,让eclipse重启下就可以了,然后就可以使用了.
- OK335xS davinci mdio driver hacking
/******************************************************************************* * OK335xS davinci m ...
- 移动端web页面使用position:fixed问题
在做移动端项目时,碰到一个很纠结的问题,头部固定的问题,一开始使用fixed,发现一系列的问题, 问题1:footer输入框 focus 状态,footer 被居中,而不是吸附在软键盘上部. 测试环境 ...
- Idea无法DEBUG的问题
最近对web工程进行debug,突然发现无法进入断点了,原来以为是maven的问题,后来发现是tomcat环境变量导致的. 使用tomcat时经常碰到内存不足的情况,我们会对catalina.bat类 ...
- Java [leetcode 24]Swap Nodes in Pairs
题目描述: Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1-& ...
- MYSQL学习心得
我的MYSQL学习心得(一) 简单语法 我的MYSQL学习心得(二) 数据类型宽度 我的MYSQL学习心得(三) 查看字段长度 我的MYSQL学习心得(四) 数据类型 我的MYSQL学习心得(五) 运 ...
- OpenGL学习之路(五)
1 引子 不知不觉我们已经进入到读书笔记(五)了,我们先对前四次读书笔记做一个总结.前四次读书笔记主要是学习了如何使用OpenGL来绘制几何图形(包括二维几何体和三维几何体),并学习了平移.旋转.缩放 ...
- iOS开发之UITextField
UITextField基本知识 UITextField展示的是一些可编辑的内容,并且与用户有一些交互.比如当你在虚拟键盘上按下return键时,一般会关联到键盘隐藏事件上.UITextField的一些 ...