|
Posted by J.O. Aho on 12/08/07 05:27
adam.timberlake@gmail.com wrote:
> My server is CentOS 4 or 5, I forget which,
cat /etc/issue
That should tell you a bit about which version you are using
> running PHP 4.1.0 with
> MySQL 5, I think. The line that it shows me the error on is:
This makes me believe it's NOT CentOS5.
> const OPT_FILE = 'talkphp_conversion_rates.json';
> Parse error: parse error, expecting `T_OLD_FUNCTION' or
> `T_FUNCTION'...
const can only be used in a class, so
<?PHP
const OPT_FILE = 'talkphp_conversion_rates.json';
?>
will genereate your error message
<?PHP
class something {
const OPT_FILE = 'talkphp_conversion_rates.json';
}
?>
This would be ok.
If you want to use a "constatn" outside a class, you have to use define as
Jerry suggested.
--
//Aho
Navigation:
[Reply to this message]
|