FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Parse error: syntax error, unexpected T_VARIABLE
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Parse error: syntax error, unexpected T_VARIABLE [message #177327 is a reply to message #177324] Sat, 10 March 2012 19:13 Go to previous messageGo to previous message
M. Strobel is currently offline  M. Strobel
Messages: 386
Registered: December 2011
Karma:
Senior Member
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.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: combobox
Next Topic: Stats comp.lang.php (last 7 days)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 23:48:14 GMT 2024

Total time taken to generate the page: 0.03247 seconds