Re: private static variable not running



<? or <?php, I get the same error message, just want to clarify that I
declared the
private static $instance in a class.

THierry

DonO wrote:
See if your config files will allow you to open php code using <? and
not <?php

I forget the setting, but that may be your problem.

HTH
D.

lamthierry@xxxxxxxxx wrote:
I have the following codes,

<?
private static $instance;
?>

which fails at he private static line with the following error message:

Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION
or T_FUNCTION or T_VAR or '}'

The above was run on linux with PHP 5.1, however the above codes run
fine on windows with the same PHP version. Any help please? I really
need to get my singleton running.

Thierry

.



Relevant Pages

  • Re: on input form showing error message for duplicate entry.
    ... | Subject: Re: on input form showing error message for duplicate entry. ... |> same validation in php since not all your visitors/customers will have ...
    (alt.php)
  • Re: [PHP] Re: http request problem
    ... while i am trying to access to another file, from another server it run ... this is the error message i get: ... browser on the same network where it fails in the PHP script? ... know your requests actually hit the server, ...
    (php.general)
  • PHP logs not working, and unable to send mail through sendmail via PHP
    ... am unable to view my php error log. ... logging and my mail options and suggest some things for me to try ... error displaying on production web sites. ... String to output before an error message. ...
    (comp.lang.php)
  • Re: [PHP] Re: http request problem
    ... however i did try to access other jsp file from the same server, ... i don't know why i keep getting the same error message file accessing ... browser on the same network where it fails in the PHP script? ... know your requests actually hit the server, ...
    (php.general)
  • Re: on input form showing error message for duplicate entry.
    ... Newsgroups: alt.php ... on input form showing error message for duplicate entry. ... | INSERT but I just don't know enough php to get this to work. ...
    (alt.php)