[PHP] passing argument between scripts

2002-12-07 Thread Geert Arts
Hi All,

I use the following, very common construct:
In script A I do a require of script B:

   require(http://www.domain.nl/test/inc/scriptB.php;);

in scriptB I define a constant:

   define(CONSTANT_X, VALUE_1);

I try to use this constant in scriptA, but it seems that the value is not 
passed:

   echo(CONSTANT_X); in srciptA

display CONSTANT_X

In scriptB the echo displays the correct value.

My hostprovider has the following setting, which in my view should make it 
possible to pass arguments as
shown above.

register_globals = on
safemode = on
open_basedir refers to the htdoc folder of the domain.

Kind regards,
Geert Arts

 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] passing argument between scripts

2002-12-07 Thread Andrew Brampton
try:
require(test/inc/scriptB.php);

I beleive that you may be including scriptB after it has been displayed by
apache (ie with all the PHP executed)

Andrew

- Original Message -
From: Geert Arts [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, December 07, 2002 4:53 PM
Subject: [PHP] passing argument between scripts


 Hi All,

 I use the following, very common construct:
 In script A I do a require of script B:

 require(http://www.domain.nl/test/inc/scriptB.php;);

 in scriptB I define a constant:

 define(CONSTANT_X, VALUE_1);

 I try to use this constant in scriptA, but it seems that the value is not
 passed:

 echo(CONSTANT_X); in srciptA

 display CONSTANT_X

 In scriptB the echo displays the correct value.

 My hostprovider has the following setting, which in my view should make it
 possible to pass arguments as
 shown above.

 register_globals = on
 safemode = on
 open_basedir refers to the htdoc folder of the domain.

 Kind regards,
 Geert Arts




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php