Ciao... ho bisogno di passare col get una stringa, e fin qui nessun problema.
Funziona, con quasi tutto, ma ho avuto problemi con questo codice ASCI: †
Come posso fare? Diventa cosi': â€
Ciao... ho bisogno di passare col get una stringa, e fin qui nessun problema.
Funziona, con quasi tutto, ma ho avuto problemi con questo codice ASCI: †
Come posso fare? Diventa cosi': â€
-_-"
devi settare il chrset della tua pagina. Tutto qui...
e poi, comunque posta sempre il codice con cui invvi e ricevi con get
Slack 10 - Apple G5 2.5 - winzoz xp
php/mysql/apache
Flash MX / roba in 3D / roba per il video e l'audio
Allora il link e' cosi':
http://www.sito.it?variabile=%E2%80%A0ASD
%E2%80%A0 sembra essere il carattere incriminato.
Quando poi lo mostro con echo, viene cosi' com'e' anziche' tornare originale (giustamente).
C'era una funzione per trasformare codici trasformati in link html in stringa originale... ma non la trovo.
-_-"
Continua a darmi lo stesso risultato, inoltre leggendo il link che mi hai dato ho trovato piu' sotto:
A reminder: if you are considering using urldecode() on a $_GET variable, DON'T!
Evil PHP:
<?php
# BAD CODE! DO NOT USE!
$term = urldecode($_GET['sterm']);
?>
Good PHP:
<?php
$term = $_GET['sterm'];
?>
The webserver will arrange for $_GET to have been urldecoded once already by the time it reaches you!
Using urldecode() on $_GET can lead to extreme badness, PARTICULARLY when you are assuming "magic quotes" on GET is protecting you against quoting.
Hint: script.php?sterm=%2527 [...]
PHP "receives" this as %27, which your urldecode() will convert to "'" (the singlequote). This may be CATASTROPHIC when injecting into SQL or some PHP functions relying on escaped quotes -- magic quotes rightly cannot detect this and will not protect you!
This "common error" is one of the underlying causes of the Santy.A worm which affects phpBB < 2.0.11.
caribe at flash-brasil dot com dot br
13-Oct-2003 10:55
To allow urldecode to work with Brazilian characters as � � � and other just place this header command :
header('Content-type: text/html; charset=UTF-8');
-_-"
in realtà non è una buona idea passare i link in get in effetti...
comunque per decodificare una stringa che arriva via get la funzione è quella.
Non è sbagliata quindi la funzione ma il suo utilizzo![]()
Continua a restituirmi †al posto di †
Anche guardando il codice html che genera si vede che e' scritto male....
-_-"
-_-"