我可以帮您进行翻译。以下是您需要翻译的内容:
我无法在本地Ubuntu测试LAMP服务器上覆盖子类中的函数,但是当上传到Web服务器时,完全相同的代码会导致所需的覆盖。
原始类:
class HandsetDetection {
function HandsetDetection() {
//code I wish to replace
}
}
我的班级:
class HandsetDetection_RespondHD extends HandsetDetection {
function HandsetDetection() {
//code I wish to use
}
}
构造函数不涉及其中。
我本地机器上使用的PHP版本是PHP 5.3.3-1ubuntu9.5 with Suhosin-Patch (cli) (built: May 3 2011 00:48:48)
覆盖成功的Web服务器上的PHP版本是5.2.17
你能想到为什么会这样吗?
HandsetDetection::HandsetDetection
是 PHP 4 风格的构造函数。参见:函数名称 = 类名。 - hakre