Re: [PHP] How do I display the script file name?

2003-02-27 Thread Stephen Ford
By including "\n" the html source looks like this, which is fine. I'll RTFM about $_SERVER and post back if in trouble. Thanks for help. Stephen $_SERVER['PHP_SELF']= $_SERVER['SCRIPT_NAME'] (etc)= __FILE__=/path/sfindex03.php $SCRIPT_FILENAME=/path/sfindex03.php Basename=sfindex03.php --

Re: [PHP] How do I display the script file name?

2003-02-27 Thread Leif K-Brooks
The Jason k Larson wrote: > I disagree. While I tend to stay away from short tags in general, the > use of the short echo tag has yet to cause any trouble for me. And it > makes code exceptionally easier to read, which proves to be a > valueable asset. Maybe you could provide and example w

Re: [PHP] How do I display the script file name?

2003-02-27 Thread Jason k Larson
I disagree. While I tend to stay away from short tags in general, the use of the short echo tag has yet to cause any trouble for me. And it makes code exceptionally easier to read, which proves to be a valueable asset. Maybe you could provide and example where a short tag is causing some trouble

Re: [PHP] How do I display the script file name?

2003-02-27 Thread Stephen Ford
I've checked up on strings, and it seems like the quoting is like the Korn shell. You can see below that I found basename() which works fine with __FILE__, but $_SERVER['PHP_SELF'] etc print nothing. Any ideas? Stephen =PHP== $_SERVER[\'PHP_SELF\']= '.$_SERVER['PHP_SELF'].""; echo '$_

Re: [PHP] How do I display the script file name?

2003-02-27 Thread Jason k Larson
'PHP_SELF'] the , should be a . (is this just a typo in the e-mail?) Thanks Mark -Original Message- From: Stephen Ford [mailto:[EMAIL PROTECTED] Sent: 27 February 2003 16:47 To: [EMAIL PROTECTED] Subject: Re: [PHP] How do I display the script file name? Partial success. The code

RE: [PHP] How do I display the script file name?

2003-02-27 Thread M.A.Bond
Stephen Ford [mailto:[EMAIL PROTECTED] Sent: 27 February 2003 16:47 To: [EMAIL PROTECTED] Subject: Re: [PHP] How do I display the script file name? Partial success. The code and output are shown below. There are no errors. What does the ".' '." do pls. Have tried a variety of

Re: [PHP] How do I display the script file name?

2003-02-27 Thread Jason k Larson
. is a string concatenation operator. ' or " are strings. Read http://www.php.net/manual/en/language.operators.string.php By the way, __LINE__ is available in addition to __FILE__. Hope that helps, Jason k Larson Stephen Ford wrote: Partial success. The code and output are shown below. There ar

Re: [PHP] How do I display the script file name?

2003-02-27 Thread Stephen Ford
Partial success. The code and output are shown below. There are no errors. What does the ".' '." do pls. Have tried a variety of combinations to see the effect. Nothing to see... :-( ===PHP== Line #1 ".' '.$_SERVER['PHP_SELF'], ""; echo "Line #2"; echo "Line #3"; echo "Line #4 ".'

Re: [PHP] How do I display the script file name?

2003-02-27 Thread Jason k Larson
The 'magic constant' __FILE__ is one way. or even better: HTH, Jason k Larson Stephen Ford wrote: How can I display the script file name? Presumably something like-: While I'm learning php and developing various Web page versions, I want to be sure the that the display is from the appropriat

Re: [PHP] How do I display the script file name?

2003-02-27 Thread Stephen Ford
Thanks I'll post back with results. Stephen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] How do I display the script file name?

2003-02-27 Thread Rich Gray
> How can I display the script file name? Presumably something like-: > > echo $ScriptFileName; > ?> > > While I'm learning php and developing various Web page versions, I want to > be sure the that the display is from the appropriate script. > > Regards > Stephen Ford, Surrey, UK Try any of thes