I’ve got the following code:
class user {
//URLs
private static $signInURL = $_SERVER['DOCUMENT_ROOT'].'/?page=signin';
...
...
...
And I get an unexpected T_VARIABLE error.
How can I construct that url so it won’t give me an error?
You cannot use a variable there, you should move it into a method. It’s bad style anyways as the class User has to know about $_SERVER.
If you really, really want it that way you could use:
I suggest using: