Guessing here:

Define can't take a variable. It has to have a constant.

define("RUSER", 1);

would compile but not give you the results you want. I'm not sure you can do
what you want.

have you tried:

define("RUSER", '$REMOTE_USER');



Cal
http://www.calevans.com


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Steven Deaton
Sent: Wednesday, January 24, 2001 4:17 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Function / syntax varying from version to version?


Using the following snippet of code.....

--------------------------------------

<?php
class User {
    var $login = $REMOTE_USER;
    var $retval;

--------------------------------------

works perfectly fine in PHP 3.0.16...yet..

this:

--------------------------------------

<?php

define("RUSER", $REMOTE_USER);

class User {
    var $login = RUSER;
#    var $login = $REMOTE_USER;
    var $retval;

--------------------------------------

does not work with PHP 4.0.3pl1.

Any ideas anyone?

Any help would be greatly appreciated.


Thanks in advance...


---Steven

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to