On Fri, Dec 29, 2006 at 11:13:00AM -0500, Dan Cech wrote:
> 
> I'm not 100% sure what the solution to this problem is.  Right now the
> only thing I can think of is to try and figure out the common part of
> PHP_SELF and SCRIPT_NAME, so as to drop both the extra filesystem info
> and any url garbage, but that seems pretty fragile to me.

I always use the __FILE__ constant.  Can't be touched by user input.  The 
basename() and dirname() are handy to use along with it.

--Dan

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
            data intensive web and database programming
                http://www.AnalysisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to