note 98375 added to reserved.variables.server
| From: | vdboor at codingdomain dot com | Date: | Fri, 11 Jun 2010 10:06:38 +0000 |
| Subject: | note 98375 added to reserved.variables.server | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-170052@lists.php.net to get a copy of this message | ||
Note that a few $_SERVER variables are not safe to use at all,
because they are based on information provided by the client-side.
For more information, see:
http://markjaquith.wordpress.com/2009/09/21/
php-server-vars-not-safe-in-forms-or-links/
Notable, to get the current directory (e.g. for opendir(), or config file reading), use:
<?php
$path = dirname(__FILE__);
?>
To post a form to the same URL, use:
<form action="">
An empty URL will redirect the form to the same page.
A single dot (.) will redirect the form to the current folder.
----
Server IP: 69.147.83.197
Probable Submitter: 84.80.203.199
----
Manual Page -- http://www.php.net/manual/en/reserved.variables.server.php
Edit -- https://master.php.net/note/edit/98375
Del: integrated -- https://master.php.net/note/delete/98375/integrated
Del: useless -- https://master.php.net/note/delete/98375/useless
Del: bad code -- https://master.php.net/note/delete/98375/bad+code
Del: spam -- https://master.php.net/note/delete/98375/spam
Del: non-english -- https://master.php.net/note/delete/98375/non-english
Del: in docs -- https://master.php.net/note/delete/98375/in+docs
Del: other reasons-- https://master.php.net/note/delete/98375
Reject -- https://master.php.net/note/reject/98375
Search -- https://master.php.net/manage/user-notes.php