I have some PHP code that works perfectly on my localhost (PHP5) but produces an error on my server (also PHP5):
Parse error: parse error, unexpected T_OBJECT_OPERATOR in /doc.php on line 60
This page is included by another page, which is included by another page:
mainpage ->include secondpage
secondpage ->include doc.php
Soooo, two questions. Why does it not work on my server, and, more importantly: what is a T_OBJECT_OPERATOR?
Help much appreciated.
Here is an excerpt of the code:
Code: Select all
57 | $pages = $doc->getElementsByTagName( "page" );
58 | foreach( $pages as $page ){
59 | $names = $page->getElementsByTagName( "name" );
>>60 | $name = $names->item(0)->nodeValue;<<