parse error

I’m setting up a new sun/moon page using the getraw.php script. I tried a simple test page and it worked fine, but on the sun/moon page I get an error:

Parse error: syntax error, unexpected T_REQUIRE_ONCE in /home/annmarie/…/…/sun-moon2.php on line 3

What could be causing this? My web server runs php 4.

Would you post the starting PHP code for the page up to and including the line 3 so we could have a look. It’s probably either an unclosed quoted string or a missing semi-colon on the end of the prior PHP statement.

Ken

Here you go:

<? php require_once 'getraw.php'; $wxdata = get_raw("wx2.html"); ?>

Ta :slight_smile:

Just change

 require_once 'getraw.php'; 

to

 require_once('getraw.php');

or to

 include("getraw.php");

Should work then…
Ken

Strange, I tried both codes but ended up with the same error :?

You might try changing

<? php

to

<?php

(take out the space between the ‘?’ and the ‘php’.

Ken

That did the trick, thanks Ken!