Re: A Doubt

From: Date: Wed, 28 Aug 2002 20:08:54 +0000
Subject: Re: A Doubt
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-21427@lists.php.net to get a copy of this message
Hi Manoj, Your reply adrress seems to be wrong: ----- The following addresses had permanent fatal errors ----- <manojjapher@rediffmail.com> (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:<manojjapher@rediffmail.com> <<< 553 sorry, your envelope sender is in my badmailfrom list (#5.7.1) 550 5.1.1 <manojjapher@rediffmail.com>... 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'

« previous php.db (#21427) next »