__construct(){issue for PHP4 and PHP5。也许是另一个原因 [英] __construct() { issue for PHP4 and PHP5. maybe an another reason
问题描述
我有CodeIgniter的奇怪的问题,
I have weird issue with CodeIgniter,
这里是我的控制器的开始部分
here is a start part of my controller
class Home extends Controller
{
/**
* Constructor
*/
public function __construct() {
parent::Controller();
}
...
在本地主机上正常工作,但是当我在服务器尝试同样的,我碰到错误如下:
everything is working fine at localhost, but when I try same at server, I come cross with an error like below:
解析错误:语法错误,意外
T_STRING,期望T_OLD_FUNCTION或
T_FUNCTION或T_VAR或'}'在
/home3/blabla/public_html/blablabla/applications/frontend/controllers/home.php
on line 22
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home3/blabla/public_html/blablabla/applications/frontend/controllers/home.php on line 22
我研究,人们说这是关于PHP4 ..它应该是PHP5。但我的服务器上有PHP5。可能是什么原因?
I researched and people say it is about PHP4.. it should be PHP5. but my server has PHP5 on. what can be the reason?
欣赏帮助!非常感谢!
推荐答案
很抱歉!我不知道怎么来的,但Bluehost信息面板说PHP 5是活跃的。我只是相信。当我做一个php_info();页面,以防万一,我看到实际上是php 4:/
I'm so sorry! I dont know how come, but Bluehost info panel says PHP 5 is active. and i just believed that. when I make a php_info(); page just in case, i saw actually it is php 4 :/
我更新了PHP5的服务器,现在一切正常。
I updated server for PHP5 and now everything is fine.
对不起,搞错了。并感谢所有您的大力支持!
I'm sorry for messing. and thanks all you for great support!!!
这篇关于__construct(){issue for PHP4 and PHP5。也许是另一个原因的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!