執行後回傳錯誤訊息
Parse error: parse error, expecting `T_OLD_FUNCTION’ or
`T_FUNCTION’ or `T_VAR’ or `’}” in ….
所以助益下列4個步驟
- 刪除所有 PUBLIC, PRIVATE and
PROTECTED 關鍵字 - Prefix “var” keyword before each variable declared in the
class. - Rename the constructor of the class (of any) from __construct() to
NameOfTheClass() - Look for PHP 5 specific functions like simplexml_load_string()
and replace/recode them with PHP4 equivalent code.
In PHP 5
class dummy() {
private $variable;
public function __constructor(){
//Contructor function....
}
public function getValue() {
..........
In PHP4
class dummy() {
var $variable;
function dummy(){
//Contructor function....
}
function getValue() {
..........
Powered by ScribeFire.
沒有留言:
張貼留言