OVH Cloud OVH Cloud

Erreur $PHP_Self

3 réponses
Avatar
Gbona
En voulant executer ces instructions

if (eregi("config.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}

Je reçois l'erreur suivante

Notice: Undefined variable: PHP_SELF in c:\nuke\config.php on line 92

Mis pourquoi ??
PHP_SELF a toujours bien marché
J'utilise EasyPHP

Merci pour qui va m'aider

3 réponses

Avatar
Jedi121
"Gbona" a écrit le 24/10/2003 :
En voulant executer ces instructions

if (eregi("config.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}

Je reçois l'erreur suivante

Notice: Undefined variable: PHP_SELF in c:nukeconfig.php on line 92

Mis pourquoi ??
PHP_SELF a toujours bien marché
J'utilise EasyPHP

Merci pour qui va m'aider


Si register_globals est à Off il faut utiliser $_SERVER['PHP_SELF']

Avatar
Thibaut Allender
Gbona wrote:

Notice: Undefined variable: PHP_SELF in c:nukeconfig.php on line 92

Mis pourquoi ??
PHP_SELF a toujours bien marché
J'utilise EasyPHP


parce que tu es maintenant en register globals off alors qu'avant tu
etais en on ?

il faut utiliser $_SERVER['PHP_SELF'] dans ce cas

a+

--
freelance + web design + php dev + digital photo
+ http://www.capsule.org

Avatar
Doraj
Gbona wrote:
En voulant executer ces instructions

if (eregi("config.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}

Je reçois l'erreur suivante

Notice: Undefined variable: PHP_SELF in c:nukeconfig.php on line 92

Mis pourquoi ??
PHP_SELF a toujours bien marché
J'utilise EasyPHP

Merci pour qui va m'aider



Je pense qu'un $_SERVER['PHP_SELF'] passera mieux

Seb