Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #5140

Re: Parse error: syntax error, unexpected T_VARIABLE

From "M. Strobel" <sorry_no_mail_here@nowhere.dee>
Newsgroups comp.lang.php
Subject Re: Parse error: syntax error, unexpected T_VARIABLE
Date 2012-03-10 18:45 +0100
Message-ID <9s1ia6FmqdU1@mid.uni-berlin.de> (permalink)
References <4f5b6bf3$0$1970$426a34cc@news.free.fr>

Show all headers | View raw


Am 10.03.2012 15:57, schrieb Une Bévue:
> at line :
> public static $JAR=$_SERVER['DOCUMENT_ROOT'] . '/AB2Html/Builder/saxon9he.jar';
> 
> i got the error :
> Parse error: syntax error, unexpected T_VARIABLE
> 
> this is inside a class.
> 
> if i test the above line apart, in another script, outside any class, i get NO error.
> 
> then, is that forbiden using such a variable "$_SERVER['DOCUMENT_ROOT'" inside a class ?
> 
> the purpose of using it is to allow my script working on both ubuntu and Mac OS X.

missing semicolon? in the line before.


/Str.

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Parse error: syntax error, unexpected T_VARIABLE Une Bévue <unbewusstsein@fai.invalid> - 2012-03-10 15:57 +0100
  Solved ? was (Parse error: syntax error, unexpected T_VARIABLE) Une Bévue <unbewusstsein@fai.invalid> - 2012-03-10 18:05 +0100
  Re: Parse error: syntax error, unexpected T_VARIABLE "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-03-10 18:45 +0100
    Re: Parse error: syntax error, unexpected T_VARIABLE Une Bévue <unbewusstsein@fai.invalid> - 2012-03-10 19:35 +0100
      Re: Parse error: syntax error, unexpected T_VARIABLE "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-03-10 20:13 +0100
        Re: Parse error: syntax error, unexpected T_VARIABLE Une Bévue <unbewusstsein@fai.invalid> - 2012-03-11 08:33 +0100
  Re: Parse error: syntax error, unexpected T_VARIABLE Jerry Stuckle <jstucklex@attglobal.net> - 2012-03-10 14:06 -0500
    Re: Parse error: syntax error, unexpected T_VARIABLE Jerry Stuckle <jstucklex@attglobal.net> - 2012-03-10 14:07 -0500
  Re: Parse error: syntax error, unexpected T_VARIABLE Umberto Salsi <salsi@icosaedro.italia> - 2012-03-10 22:21 +0100
    Re: Parse error: syntax error, unexpected T_VARIABLE Une Bévue <unbewusstsein@fai.invalid> - 2012-03-11 08:34 +0100

csiph-web