blog personale

PHP: quando register_globals = off

Per montare un’applicazione/cms/script che funziona solo con register_globals = on (che sconsiglio !),
invece di rinominare tutte le variabili:

soluzione per tutta la cartella
crea .htaccess e scrivici "php_flag register_globals On"

soluzione per i singoli script
foreach($_POST AS $key => $value) { ${$key} = $value; }
foreach($_GET AS $key => $value) { ${$key} = $value; }
//da fare anche con SESSION e COOKIE se sono usati

Leave a comment

Name: (Required)

E-mail: (Required)

Website:

Comment:

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word


 

Ultimi post

About Me

Blog tecnico/geek di Elvis. Chi sono ? studente & web developer freelance. Vedi la pagina "about me" per altre info.

scontiPHP