PHP Strict standards: Redefining already defined constructor for class问题
来源:互联网 发布:vb.net asp.net 编辑:程序博客网 时间:2024/05/08 16:25
这个问题是PHP高低版本中,对于类的构造函数写法不一样造成的。
在PHP4中,类的构造函数是一个和类名同名的函数作为构造函数的,
而在PHP5以后,用__construct()作为构造函数,但同时也支持PHP4中用类同名的构造函数方法,
同时使用的时候,请注意 同名函数不能放在__construct()构造函数前面。
class test
{
function __construct() //此构造函数须写在前
{
//php代码
}
function test() //此函数须写在后
{
//php代码
}
}
如果把 同名函数写在前面,就会出现如下提示:
Strict standards: Redefining already defined constructor for class....
0 0
- PHP Strict standards: Redefining already defined constructor for class问题
- ecshop建站问题:Strict Standards: Redefining already defined constructor for class alipay in /data/web/in
- ecshop出现警告:Strict standards: Redefining already defined constructor for class
- php版本切换问题:Redefining already defined constructor for class
- ECSHOP Strict Standards: Redefining already defined constructor 错误
- ecshop中出现Redefining already defined constructor for class 的解决方法
- PHP 错误Redefining already defined constructor for class如何解决 本地PHP环境PHP5.4,安装ecshop2.7.3后,很多地方会报如下的错
- PHP Strict Standards:问题解决
- PHP的Strict Standards错误
- PHP Strict Standards: Only variables should be passed by reference问题
- error LNK2005:class CWinApp already defined
- 安装Joomla后报错:Strict Standards
- PHP Notice: Constant **** already defined in解决
- PHP Strict standards:Declaration of ... should be compatible with that of...
- PHP Strict standards:Declaration of … should be compatible with that of…
- php错误:Strict Standards: Only variables should be passed by reference in
- In bugfree, 解决Strict Standards: Only variables should be passed by reference in FuncModel.inc.php
- 问:我安装ECMall后报PHP Strict Standards错误,请问如何解决
- Linux精简版配置及编译运行
- Base32加解密算法与实战
- WebSocket(from Wikipedia)
- 7-1-深度复制
- 怎样完成一篇通信类硕士论文
- PHP Strict standards: Redefining already defined constructor for class问题
- opencv图片的反转
- 电放费更健康付过款工行卡刚回来嘎啦果合理规划
- 在线考试系统设计与实现精要
- 忙里偷闲( ˇˍˇ )闲里偷学【C语言篇】——(6)动态内存分配
- 穷人和过于忙碌的人有一个共同思维特质
- PAT 1021. 个位数统计 (15)
- Matlab Connector 与UDPSensor 连接到电脑的问题?
- MySQL IF Statement