Hi
I have a 'Parse error' problem that I have no idea of how to solve.
What is wrong with the following? This code is in a file and is
loaded into memory using 'include'. This is part of a larger program for which I've isolated this part.
<?php
class parser
{
private $config = array
(
"open_string" => array("[',']"),
"close_string" => array("[/',']")
);
}
?>
On my development computer there is no problem, but on the server I get this error.
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}'
in /homepages/.../class/parser_class.php on line 5.
I've tested the class with a function to echo a word on the screen. That worked fine.
What I don't understand is why this code is ok on the development computer, but not on the server.
I'm at a loss. Can anyone help?
ShiningTor
Array - Parse error problem
Moderator: General Moderators
Re: Array - Parse error problem
I'm guessing the Server doesn't have php5 and your development computer does.
Check what version of php you have on the server/development computer.
Check what version of php you have on the server/development computer.