Hi Manoj, Your reply adrress seems to be wrong: ----- The following addresses had permanent fatal errors ----- <[EMAIL PROTECTED]> (reason: 553 sorry, your envelope sender is in my badmailfrom list (#5.7.1))
----- Transcript of session follows ----- ... while talking to mail3.rediffmail.com.: >>> RCPT To:<[EMAIL PROTECTED]> <<< 553 sorry, your envelope sender is in my badmailfrom list (#5.7.1) 550 5.1.1 <[EMAIL PROTECTED]>... User unknown try out this main.php: <? include('include.php'); ?> include.php: <? echo $_SERVER['SCRIPT_NAME']; ?> Now run include.php directly outputted is: /include.php run main.php outputted is: /main.php Hope that helps? so in include.php, you can say: if($_SERVER['SCRIPT_NAME']!='/main.php') {echo 'forbidden to call the script direcly'; exit;} Op woensdag 28 augustus 2002 22:26, schreef u: > hi bas, > I am sorry but I could not follow what you meant by saying > include > abcd.php. I am a bit new to PHP and so I am bit slow to grasp > the > concepts. If I am not wrong, I understand that if by including a > file > the whole file is displayed in addition to the main file, i.e. if > I > include abcd.php in mnop.php the output would be mnop.php plus the > the > output of abcd.php, right? > > And could you explain what "$_SERVER['SCRIPT_NAME'] equals > /mnop.php > for both scripts." means. > > Thanks for your help and patience. I appreciate that. > > Best Regards, > > Manoj. Op woensdag 28 augustus 2002 17:44, schreef Manoj Japher: > hi, > I have a question. Hoping someone may help me out. > > Can a PHP page say file "abcd.php" access a variable $xyz which > is > used in another file "mnop.php"? I mean can I refer to a > variable > whose value has been set in some other file. > The point is that the file "mnop.php" after finishing its query > and > on a particular case loads "abcd.php". > > The reason is, I need to check everytime the file "abcd.php" > is > loaded, I should be able to determine that it was loaded by > "mnop.php" > and not by typing in the complete URL to "abcd.php" on the Web > Browser. > > Hoping someone could tell me how if it is possible > > Best Regards, > > Manoj > > > 'I have miles to go before I sleep, and promises to keep' -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php