p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

beginning_php thread: PHP_SELF


Message #1 by "Deepak Kumar Vasudevan" <deepak@c...> on Mon, 6 May 2002 09:45:47 +0530
Hi,

From PHP 4.2.0, register_globals is off by default. Hence you may have to
use

$_SERVER["PHP_SELF"]

or

$_SERVER["SCRIPT_NAME"]

If you are within a function, just declare

global $_SERVER;

after the function starting braces to get access to the host of server
variables from within the function.  Whilst $HTTP_SERVER_VARS will still
work, it has been deprecated in favor of the shorthand counterpart $_SERVER
since PHP 4.1.1

==========================================
Deepak Kumar Vasudevan, Software Engineer
CS Software Solutions Pvt. Ltd.
425 Pantheon Road, Egmore, Chennai 600 008, INDIA
Phones: +91 (44) 8311334 thru 38. Fax: +91 (44) 8311339
URL: www.cssolutionsinc.com
==========================================


  Return to Index