Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    [REGEX] sanitize query string

    Ciao.
    Sarò diventato paranoico ma meglio
    prevenire che curare


    Sto cercando una funzione del genere

    falso codice:

    Codice PHP:
    function ParseQuery(){
        
    $result = array();
        foreach(
    explode('&', (string)$_SERVER['QUERY_STRING']) as $arg){
            if(
    preg_match('che ci metto quà'$arg$matches)){
                
    $result[$matches[1]] = (string)$matches[2];
            }
        }
        return 
    $result;



    Without faith, nothing is possible. With it, nothing is impossible
    http://ilwebdifabio.it

  2. #2
    Esiste già una funzione apposta:

    Codice PHP:
    parse_str($_SERVER['QUERY_STRING'],$output); 
    dA .. foto di viaggio
    L'esperienza è il tipo di insegnante più difficile.
    Prima ti fa l'esame, e poi ti spiega la lezione.

  3. #3
    Originariamente inviato da Anªkin
    Esiste già una funzione apposta:

    Codice PHP:
    parse_str($_SERVER['QUERY_STRING'],$output); 
    Grazie la conosceva già ma
    leggendo su php.net non mi sembra
    poi così affidabile

    Che ne pensi ?


    Without faith, nothing is possible. With it, nothing is impossible
    http://ilwebdifabio.it

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.