Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #5144
| 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 20:13 +0100 |
| Message-ID | <9s1nekF1bjU1@mid.uni-berlin.de> (permalink) |
| References | <4f5b6bf3$0$1970$426a34cc@news.free.fr> <9s1ia6FmqdU1@mid.uni-berlin.de> <4f5b9ef5$0$8623$426a74cc@news.free.fr> |
Am 10.03.2012 19:35, schrieb Une Bévue:
> Le 10/03/2012 18:45, M. Strobel a écrit :
>> missing semicolon? in the line before.
>
> no, I did verify this point.
>
> in fact i comment out the faulty line and put after it :
>
> public static $JAR='/home/yt/Sites/AB2Html/Builder/saxon9he.jar';
> surprisingly the part giving the error, was,for me :
> $_SERVER['DOCUMENT_ROOT']
>
> in a class :
>
> <?php
>
> define('JAVA_BIN', '/usr/bin/java');
> define('SAXON9HE_JAR', $_SERVER['DOCUMENT_ROOT'] . '/AB2Html/Builder/saxon9he.jar');
>
> class XSLTSaxonProcessor {
> //public static $JAVA='/usr/bin/java';
> //public static $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
> //$JAR=$_SERVER['DOCUMENT_ROOT'] . '/AB2Html/Builder/saxon9he.jar';
this is the offending line
> // Parse error: syntax error, unexpected T_VARIABLE in
> /home/yt/Sites/AB2Html/Builder/xsltsaxonproc.php on line 5
> //public static $JAR='/home/yt/Sites/AB2Html/Builder/saxon9he.jar';
> public static $xsl;
> public static $xml;
> public static $params;
> public static $out;
>
> ...
>
Okay, I can see the error. I suppose it is a limitation of the direct variable
initialization, but I could not find any reference about it.
Put your init code in the constructor in this case.
/Str.
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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