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
Solved ? was (Parse error: syntax error, unexpected T_VARIABLE) [message #177322 is a reply to message #177321] Sat, 10 March 2012 17:05 Go to previous messageGo to previous message
Une Bvue is currently offline  Une Bvue
Messages: 30
Registered: March 2012
Karma:
Member
Le 10/03/2012 15:57, Une Bévue a écrit :
> 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.

i put those vars outside of the class like this :
define('JAVA_BIN', '/usr/bin/java');
define('SAXON9HE_JAR', $_SERVER['DOCUMENT_ROOT'] .
'/AB2Html/Builder/saxon9he.jar');

class XSLTSaxonProcessor {

and that works fine...
[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: Mon Nov 25 01:50:18 GMT 2024

Total time taken to generate the page: 0.07699 seconds