note 63677 added to security.globals
| From: | rodfraga at gmail dot com | Date: | Tue, 28 Mar 2006 07:08:12 +0000 |
| Subject: | note 63677 added to security.globals | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-106807@lists.php.net to get a copy of this message | ||
una caracterÃstica del register globals
Cuando esta en ON
Archivo salida.php
<?php
$op = "sec";
echo "<a href=\"destino.php?op=$op\">Link</a>";
?>
archivo destino.php
<?php
echo $op;
?>
el archivo destino imprime "sec"
-----------------------------------------------------------
Cuando esta en Off
Archivo salida.php
<?php
$op = "sec";
echo "<a href=\"destino.php?op=$op\">Link</a>";
?>
archivo destino.php [Esto no funcionará, es erroneo]
<?php
echo $op;
?>
No imprime nada!!, aquà el archivo destino requiere obtener la variable $op
archivo destino.php [Esto si funcionará]
<?php
$final = $_GET['op'];
echo $final;
?>
Asà el archivo destino imprime $final, que corresponde a "sec"
----
Server IP: 200.36.127.20
Probable Submitter: 200.77.85.226
----
X-Spam-Status: Yes, hits=8.4 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER,
HEAD_ILLEGAL_CHARS,HTML_20_30,HTML_MESSAGE,HTML_TAG_BALANCE_A
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/security.globals.php
Edit -- http://master.php.net/note/edit/63677
Del: integrated -- http://master.php.net/note/delete/63677/integrated
Del: useless -- http://master.php.net/note/delete/63677/useless
Del: bad code -- http://master.php.net/note/delete/63677/bad+code
Del: spam -- http://master.php.net/note/delete/63677/spam
Del: non-english -- http://master.php.net/note/delete/63677/non-english
Del: in docs -- http://master.php.net/note/delete/63677/in+docs
Del: other reasons-- http://master.php.net/note/delete/63677
Reject -- http://master.php.net/note/reject/63677
Search -- http://master.php.net/manage/user-notes.php