Re: Variables globales
| From: | Rafael Salazar | Date: | Thu, 13 Nov 2003 22:33:39 +0000 |
| Subject: | Re: Variables globales | ||
| References: | 1 2 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-42585@lists.php.net to get a copy of this message | ||
At 13/11/2003 02:45, you wrote:
On 11/13/2003 at 8:09 AM jm aribau wrote: Que es mejor usar $HTTP_POST_VARS o $_POST? Es para empezar un proyecto nuevo. [···]
In PHP 4.2.0 and later, the default value for the PHP directive register_globals is off. This is a major change in PHP. Having register_globals off affects the set of predefined variables available in the global scope. For example, to get DOCUMENT_ROOT you'll use $_SERVER['DOCUMENT_ROOT'] instead of $DOCUMENT_ROOT, or $_GET['id'] from the URL http://www.example.com/test.php?id=3 instead of $id, or $_ENV['HOME'] instead of $HOME.
Asumo que en esa misma página, en una sección que no incluyeron, debe hablar sobre la diferencia entre ambas que, si mal no recuerdo, es simplemente la versión de PHP y tu flojera para escribir :p
Rafael.